mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Mark CC subtitle track as CC & grab normal subtitles and CC when using -m audio (#141)
This commit is contained in:
parent
c0e2df4804
commit
847c6a1abc
4 changed files with 38 additions and 26 deletions
|
|
@ -203,12 +203,14 @@ 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]),
|
||||
subtitles: subtitle
|
||||
.clone()
|
||||
.map_or(vec![], |s| vec![(s, single_format.audio == Locale::ja_JP)]),
|
||||
};
|
||||
let format = Format::from_single_formats(vec![(
|
||||
single_format.clone(),
|
||||
video,
|
||||
subtitle.map_or(vec![], |s| vec![s]),
|
||||
subtitle.map_or(vec![], |s| vec![(s, single_format.audio == Locale::ja_JP)]),
|
||||
)]);
|
||||
|
||||
Ok((download_format, format))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue