Corrected case involving source format
This commit is contained in:
parent
5b6adccf4e
commit
70a2530456
|
|
@ -702,9 +702,41 @@ export async function convert(
|
|||
const audioFormatsWithCover = ["m4a", "mp3", "flac", "ogg"];
|
||||
const audioFormatsNoCover = ["wav", "aac"];
|
||||
|
||||
if (audioFormatsWithCover.includes(convertTo)) {
|
||||
const audioInputFormats = [
|
||||
"aac",
|
||||
"ac3",
|
||||
"ac4",
|
||||
"aiff",
|
||||
"alac",
|
||||
"amr",
|
||||
"ape",
|
||||
"au",
|
||||
"caf",
|
||||
"dts",
|
||||
"eac3",
|
||||
"flac",
|
||||
"m4a",
|
||||
"m4b",
|
||||
"mka",
|
||||
"mp2",
|
||||
"mp3",
|
||||
"mpc",
|
||||
"ogg",
|
||||
"oga",
|
||||
"opus",
|
||||
"ra",
|
||||
"voc",
|
||||
"wav",
|
||||
"wma",
|
||||
"wv",
|
||||
];
|
||||
|
||||
if (
|
||||
audioFormatsWithCover.includes(convertTo) &&
|
||||
audioInputFormats.includes(fileType.toLowerCase())
|
||||
) {
|
||||
extraArgs.push("-c:v", "copy", "-disposition:v", "attached_pic");
|
||||
} else if (audioFormatsNoCover.includes(convertTo)) {
|
||||
} else if (audioFormatsNoCover.includes(convertTo) || audioFormatsWithCover.includes(convertTo)) {
|
||||
extraArgs.push("-vn");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue