fix: increase default timeout to 20s, use ffmpeg copy arg
refactor: use enum for navigation endpoint
This commit is contained in:
parent
dc7bd7befc
commit
805cc5088f
11 changed files with 226 additions and 157 deletions
|
|
@ -429,7 +429,7 @@ async fn download_streams(
|
|||
}
|
||||
|
||||
async fn convert_streams<P: Into<PathBuf>>(
|
||||
downloads: &Vec<StreamDownload>,
|
||||
downloads: &[StreamDownload],
|
||||
output: P,
|
||||
ffmpeg: &str,
|
||||
) -> Result<()> {
|
||||
|
|
@ -448,11 +448,8 @@ async fn convert_streams<P: Into<PathBuf>>(
|
|||
|
||||
args.append(&mut mapping_args);
|
||||
|
||||
// Combining multiple streams, keep codecs
|
||||
if downloads.len() > 1 {
|
||||
args.push("-c".into());
|
||||
args.push("copy".into());
|
||||
}
|
||||
args.push("-c".into());
|
||||
args.push("copy".into());
|
||||
|
||||
args.push(output_path.into());
|
||||
|
||||
|
|
|
|||
Reference in a new issue