|
|
@ -15,13 +15,16 @@ pub fn get_command<'a>() -> Command<'a, str>{ |
|
|
|
)
|
|
|
|
})
|
|
|
|
.runner(| _args, matches| {
|
|
|
|
// println!("Running dedupe, logging = {}", args);
|
|
|
|
let dry_run = matches.is_present("dry-run");
|
|
|
|
match matches.values_of("playlist") {
|
|
|
|
Some(playlists) => {
|
|
|
|
for path in playlists {
|
|
|
|
let playlist = Playlist::read(path)?;
|
|
|
|
println!("{:?}", playlist);
|
|
|
|
playlist.write(path)?
|
|
|
|
if ! dry_run {
|
|
|
|
playlist.write(path)?
|
|
|
|
} else {
|
|
|
|
println!("{:?}", playlist);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Ok(())
|
|
|
|
},
|
|
|
|