mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Merge remote-tracking branch 'origin/master' into feature/relative_sequence_number
# Conflicts: # crunchy-cli-core/src/utils/format.rs
This commit is contained in:
commit
5d17bb1ac7
7 changed files with 253 additions and 196 deletions
|
|
@ -100,6 +100,10 @@ pub struct Archive {
|
|||
#[arg(short, long, default_value_t = false)]
|
||||
pub(crate) yes: bool,
|
||||
|
||||
#[arg(help = "The number of threads used to download")]
|
||||
#[arg(short, long, default_value_t = num_cpus::get())]
|
||||
pub(crate) threads: usize,
|
||||
|
||||
#[arg(help = "Crunchyroll series url(s)")]
|
||||
#[arg(required = true)]
|
||||
pub(crate) urls: Vec<String>,
|
||||
|
|
@ -160,7 +164,8 @@ impl Execute for Archive {
|
|||
.ffmpeg_preset(self.ffmpeg_preset.clone().unwrap_or_default())
|
||||
.output_format(Some("matroska".to_string()))
|
||||
.audio_sort(Some(self.audio.clone()))
|
||||
.subtitle_sort(Some(self.subtitle.clone()));
|
||||
.subtitle_sort(Some(self.subtitle.clone()))
|
||||
.threads(self.threads);
|
||||
|
||||
for single_formats in single_format_collection.into_iter() {
|
||||
let (download_formats, mut format) = get_format(&self, &single_formats).await?;
|
||||
|
|
@ -170,7 +175,7 @@ impl Execute for Archive {
|
|||
downloader.add_format(download_format)
|
||||
}
|
||||
|
||||
let formatted_path = format.format_path((&self.output).into(), true);
|
||||
let formatted_path = format.format_path((&self.output).into());
|
||||
let (path, changed) = free_file(formatted_path.clone());
|
||||
|
||||
if changed && self.skip_existing {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue