mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add forced flag to all CC subtitles (#274)
This commit is contained in:
parent
b97c2a922e
commit
8613ea80cc
1 changed files with 12 additions and 1 deletions
|
|
@ -434,12 +434,23 @@ impl Downloader {
|
||||||
{
|
{
|
||||||
command_args.extend([
|
command_args.extend([
|
||||||
format!("-disposition:s:s:{}", position),
|
format!("-disposition:s:s:{}", position),
|
||||||
"forced".to_string(),
|
"default".to_string(),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the 'forced' flag to CC subtitles
|
||||||
|
for (i, subtitle) in subtitles.iter().enumerate() {
|
||||||
|
// well, checking if the title contains '(CC)' might not be the best solutions from a
|
||||||
|
// performance perspective but easier than adjusting the `FFmpegMeta` struct
|
||||||
|
if !subtitle.title.contains("(CC)") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
command_args.extend([format!("-disposition:s:s:{}", i), "forced".to_string()])
|
||||||
|
}
|
||||||
|
|
||||||
command_args.extend(output_presets);
|
command_args.extend(output_presets);
|
||||||
if let Some(output_format) = self.output_format {
|
if let Some(output_format) = self.output_format {
|
||||||
command_args.extend(["-f".to_string(), output_format]);
|
command_args.extend(["-f".to_string(), output_format]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue