feat: add the newly added video to playlists if any

This commit is contained in:
VC
2023-10-14 22:45:08 +02:00
parent 8d4d683f55
commit ebc42f915d
5 changed files with 178 additions and 9 deletions

View File

@@ -17,6 +17,15 @@ fn main() {
.default_value(DEFAULT_CONFIG_PATH)
.display_order(1),
)
.arg(
Arg::new("playlists")
.short('p')
.long("playlist")
.value_name("PLAYLIST")
.help("List of playlists to add the video to")
.num_args(0..)
.display_order(2),
)
.subcommand(
Command::new("register")
.version(env!("CARGO_PKG_VERSION"))
@@ -43,7 +52,13 @@ fn main() {
let config = parse_toml(matches.get_one::<String>("config").unwrap());
let playlists: Vec<String> = matches
.get_many::<String>("playlists")
.unwrap_or_default()
.map(|v| v.to_string())
.collect();
env_logger::init();
run(config);
run(config, playlists);
}