mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
This commit is contained in:
parent
54dfe8002e
commit
7588621f34
3 changed files with 128 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use crate::cli::log::tab_info;
|
||||
use crate::cli::utils::{download_segments, find_resolution, FFmpegPreset};
|
||||
use crate::cli::utils::{download_segments, find_resolution, FFmpegPreset, interactive_season_choosing, find_multiple_seasons_with_same_number};
|
||||
use crate::utils::context::Context;
|
||||
use crate::utils::format::{format_string, Format};
|
||||
use crate::utils::log::progress;
|
||||
|
|
@ -71,6 +71,10 @@ pub struct Download {
|
|||
#[arg(value_parser = FFmpegPreset::parse)]
|
||||
ffmpeg_preset: Vec<FFmpegPreset>,
|
||||
|
||||
#[arg(help = "Ignore interactive input")]
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
yes: bool,
|
||||
|
||||
#[arg(help = "Url(s) to Crunchyroll episodes or series")]
|
||||
urls: Vec<String>,
|
||||
}
|
||||
|
|
@ -348,6 +352,12 @@ async fn formats_from_series(
|
|||
})
|
||||
}
|
||||
|
||||
if !download.yes && !find_multiple_seasons_with_same_number(&seasons).is_empty() {
|
||||
info!(target: "progress_end", "Fetched seasons");
|
||||
seasons = interactive_season_choosing(seasons);
|
||||
info!(target: "progress", "Fetching series details")
|
||||
}
|
||||
|
||||
let mut formats = vec![];
|
||||
for season in seasons {
|
||||
if let Some(fmts) = formats_from_season(download, season, url_filter).await? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue