Updates for the "full flow"

This commit is contained in:
Connor Johnstone
2026-03-17 21:38:27 -04:00
parent fed3a070fc
commit ea1e3c6ac5
5 changed files with 129 additions and 18 deletions

View File

@@ -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}");
}
}
}
}