Updates for the "full flow"
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -105,6 +105,12 @@ enum QueueAction {
|
||||
},
|
||||
/// Retry all failed downloads.
|
||||
Retry,
|
||||
/// Sync wanted items from the watchlist to the download queue.
|
||||
Sync {
|
||||
/// Preview what would be enqueued without doing it.
|
||||
#[arg(long)]
|
||||
dry_run: bool,
|
||||
},
|
||||
}
|
||||
|
||||
fn default_database_url() -> String {
|
||||
@@ -276,6 +282,13 @@ async fn main() -> anyhow::Result<()> {
|
||||
println!("Requeued {} failed downloads.", failed.len());
|
||||
}
|
||||
}
|
||||
QueueAction::Sync { dry_run } => {
|
||||
if dry_run {
|
||||
println!("DRY RUN — no items will be enqueued");
|
||||
}
|
||||
let stats = shanty_dl::sync_wanted_to_queue(db.conn(), dry_run).await?;
|
||||
println!("\nSync complete: {stats}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user