fix: broken image sequences

okay this is terrible why am i a developer for ts
This commit is contained in:
Maya 2026-05-12 13:00:16 +03:00
parent 2f30c454dc
commit 8850b25f8b
No known key found for this signature in database
4 changed files with 29 additions and 25 deletions

View File

@ -58,7 +58,9 @@ export class FFmpegConverter extends Converter {
new FormatInfo("m4b", true, true), new FormatInfo("m4b", true, true),
new FormatInfo("voc", true, true), new FormatInfo("voc", true, true),
new FormatInfo("weba", true, true), new FormatInfo("weba", true, true),
...videoFormats.map((f: string) => new FormatInfo(f, true, true, false, 0)), ...videoFormats.map(
(f: string) => new FormatInfo(f, true, true, false, 0),
),
]; ];
public readonly reportsProgress = true; public readonly reportsProgress = true;
@ -194,9 +196,9 @@ export class FFmpegConverter extends Converter {
if (!to.startsWith(".")) to = `.${to}`; if (!to.startsWith(".")) to = `.${to}`;
const conversionSettings = const conversionSettings =
Object.keys(settings).length > 5 // TODO: find better way to do this lmfao, rn we are just assuming all settings are present if there's at least 5 keys but ts bad Object.keys(settings).length > 4 // TODO: find better way to do this lmfao, rn we are just assuming all settings are present if there's at least 5 keys but ts bad
? settings ? settings
: await this.getDefaultSettings(); // use defaults if not provided : Object.assign(settings, await this.getDefaultSettings()); // use defaults if not provided
const isAlac = to === ".alac"; const isAlac = to === ".alac";
if (isAlac) to = ".m4a"; if (isAlac) to = ".m4a";

View File

@ -302,9 +302,12 @@ export class MagickConverter extends Converter {
// every other format handled by magick worker // every other format handled by magick worker
const conversionSettings = JSON.stringify( const conversionSettings = JSON.stringify(
Object.keys(settings).length > 5 Object.keys(settings).length > 4
? settings // user-provided settings ? settings // user-provided settings
: await this.getDefaultSettings(input), // use defaults if not provided : Object.assign(
settings,
await this.getDefaultSettings(input),
), // use defaults if not provided
); );
const convertMsg: WorkerMessage = { const convertMsg: WorkerMessage = {
type: "convert", type: "convert",

View File

@ -492,9 +492,9 @@ export class MediabunnyConverter extends Converter {
}); });
const conversionSettings = const conversionSettings =
Object.keys(settings).length > 5 Object.keys(settings).length > 4
? settings // user-provided settings ? settings
: await this.getDefaultSettings(file); // use defaults if not provided : Object.assign(settings, await this.getDefaultSettings(file)); // use defaults if not provided
const videoConfig = buildVideoConfig(conversionSettings); const videoConfig = buildVideoConfig(conversionSettings);
const audioConfig = buildAudioConfig(conversionSettings); const audioConfig = buildAudioConfig(conversionSettings);

View File

@ -745,10 +745,9 @@ export class VertdConverter extends Converter {
let fileUpload = input; let fileUpload = input;
const conversionSettings = // vertd expects object not string json const conversionSettings = // vertd expects object not string json
Object.keys(settings).length > 5 Object.keys(settings).length > 4
? settings // user-provided settings ? settings // user-provided settings
: await this.getDefaultSettings(input); // use defaults if not provided : Object.assign(settings, await this.getDefaultSettings(input)); // use defaults if not provided
// if converting animated webp to video, first convert to gif // if converting animated webp to video, first convert to gif
// ffmpeg (in vertd) doesn't support decoding animated webp still.. while supporting encoding animated webp for some reason // ffmpeg (in vertd) doesn't support decoding animated webp still.. while supporting encoding animated webp for some reason
// https://trac.ffmpeg.org/ticket/4907 // https://trac.ffmpeg.org/ticket/4907