Added plus args for files with cover img.

This commit is contained in:
Orban Gergo 2026-08-15 22:53:41 +03:00
parent c8551d9548
commit 5b6adccf4e
1 changed files with 9 additions and 0 deletions

View File

@ -699,6 +699,15 @@ export async function convert(
let extraArgs: string[] = [];
let message = "Done";
const audioFormatsWithCover = ["m4a", "mp3", "flac", "ogg"];
const audioFormatsNoCover = ["wav", "aac"];
if (audioFormatsWithCover.includes(convertTo)) {
extraArgs.push("-c:v", "copy", "-disposition:v", "attached_pic");
} else if (audioFormatsNoCover.includes(convertTo)) {
extraArgs.push("-vn");
}
if (convertTo === "ico") {
// Make sure image is 256x256 or smaller
extraArgs = [