Skip to content

best way to save what you love

web/types/libav: replace "extension" with "format" in FileInfo

wukkoff62a4c2e64e
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 = {