From ff62a4c2e64e3ea10a721209578e14b6a9f98aeb Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 12 Feb 2025 13:17:56 +0600 Subject: [PATCH] web/types/libav: replace "extension" with "format" in FileInfo --- web/src/lib/libav.ts | 8 +++++--- web/src/lib/queen-bee/queue.ts | 4 ++-- web/src/lib/types/libav.ts | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web/src/lib/libav.ts b/web/src/lib/libav.ts index fc158934..37e61276 100644 --- a/web/src/lib/libav.ts +++ b/web/src/lib/libav.ts @@ -39,6 +39,8 @@ export default class LibAVWrapper { if (!this.libav) throw new Error("LibAV wasn't initialized"); const libav = await this.libav; + console.log('yay loaded libav :3'); + await libav.mkreadaheadfile('input', blob); try { @@ -65,11 +67,11 @@ export default class LibAVWrapper { if (!this.libav) throw new Error("LibAV wasn't initialized"); const libav = await this.libav; - if (!(output.extension && output.type)) { - throw new Error("output's extension or type is missing"); + if (!(output.format && output.type)) { + throw new Error("output's format or type is missing"); } - const outputName = `output.${output.extension}`; + const outputName = `output.${output.format}`; const ffInputs = []; try { diff --git a/web/src/lib/queen-bee/queue.ts b/web/src/lib/queen-bee/queue.ts index c1d0f8a4..a6c96238 100644 --- a/web/src/lib/queen-bee/queue.ts +++ b/web/src/lib/queen-bee/queue.ts @@ -33,7 +33,7 @@ export const createRemuxPipeline = (file: File) => { ], output: { type: file.type, - extension: file.name.split(".").pop(), + format: file.name.split(".").pop(), }, }, }]; @@ -80,7 +80,7 @@ export const createSavePipeline = (info: CobaltLocalProcessingResponse) => { output: { // TODO: return mime type from api to avoid dragging a big ass package into web build type: mime.getType(info.filename) || undefined, - extension: info.filename.split(".").pop(), + format: info.filename.split(".").pop(), }, }, }) diff --git a/web/src/lib/types/libav.ts b/web/src/lib/types/libav.ts index 9871e4cb..673637f2 100644 --- a/web/src/lib/types/libav.ts +++ b/web/src/lib/types/libav.ts @@ -2,7 +2,7 @@ import type { CobaltFileReference } from "$lib/types/storage"; export type FileInfo = { type?: string, - extension?: string, + format?: string, } export type RenderParams = {