mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-07-21 13:24:19 +02:00
feat: add the newly added video to playlists if any
This commit is contained in:
17
src/main.rs
17
src/main.rs
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user