mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Enable usage of auth flags behind login command
This commit is contained in:
parent
c2e953043e
commit
61766c74fa
4 changed files with 59 additions and 33 deletions
|
|
@ -203,14 +203,22 @@ async fn get_format(
|
|||
let download_format = DownloadFormat {
|
||||
video: (video.clone(), single_format.audio.clone()),
|
||||
audios: vec![(audio, single_format.audio.clone())],
|
||||
subtitles: subtitle
|
||||
.clone()
|
||||
.map_or(vec![], |s| vec![(s, single_format.audio == Locale::ja_JP || stream.subtitles.len() > 1)]),
|
||||
subtitles: subtitle.clone().map_or(vec![], |s| {
|
||||
vec![(
|
||||
s,
|
||||
single_format.audio == Locale::ja_JP || stream.subtitles.len() > 1,
|
||||
)]
|
||||
}),
|
||||
};
|
||||
let format = Format::from_single_formats(vec![(
|
||||
single_format.clone(),
|
||||
video,
|
||||
subtitle.map_or(vec![], |s| vec![(s, single_format.audio == Locale::ja_JP || stream.subtitles.len() > 1)]),
|
||||
subtitle.map_or(vec![], |s| {
|
||||
vec![(
|
||||
s,
|
||||
single_format.audio == Locale::ja_JP || stream.subtitles.len() > 1,
|
||||
)]
|
||||
}),
|
||||
)]);
|
||||
|
||||
Ok((download_format, format))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue