web/queue: fix filename on downloads, add mimetype, remove duplicates
filename is no longer passed to workers for no reason
This commit is contained in:
@@ -35,7 +35,6 @@ export const createRemuxPipeline = (file: File) => {
|
||||
type: file.type,
|
||||
extension: file.name.split(".").pop(),
|
||||
},
|
||||
filename: file.name,
|
||||
},
|
||||
}];
|
||||
|
||||
@@ -45,6 +44,7 @@ export const createRemuxPipeline = (file: File) => {
|
||||
state: "waiting",
|
||||
pipeline,
|
||||
filename: file.name,
|
||||
mimeType: file.type,
|
||||
mediaType,
|
||||
})
|
||||
}
|
||||
@@ -82,7 +82,6 @@ export const createSavePipeline = (info: CobaltLocalProcessingResponse) => {
|
||||
type: mime.getType(info.filename) || undefined,
|
||||
extension: info.filename.split(".").pop(),
|
||||
},
|
||||
filename: info.filename,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -91,6 +90,7 @@ export const createSavePipeline = (info: CobaltLocalProcessingResponse) => {
|
||||
state: "waiting",
|
||||
pipeline,
|
||||
filename: info.filename,
|
||||
mimeType: mime.getType(info.filename) || undefined,
|
||||
mediaType: "video",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -21,8 +21,7 @@ export const runRemuxWorker = async (
|
||||
parentId: string,
|
||||
files: CobaltFileReference[],
|
||||
args: string[],
|
||||
output: FileInfo,
|
||||
filename: string
|
||||
output: FileInfo
|
||||
) => {
|
||||
const worker = new RemuxWorker();
|
||||
|
||||
@@ -55,7 +54,6 @@ export const runRemuxWorker = async (
|
||||
files,
|
||||
args,
|
||||
output,
|
||||
filename,
|
||||
}
|
||||
});
|
||||
|
||||
@@ -165,14 +163,13 @@ export const startWorker = async ({ worker, workerId, parentId, workerArgs }: Co
|
||||
}
|
||||
}
|
||||
|
||||
if (files.length > 0 && workerArgs.ffargs && workerArgs.output && workerArgs.filename) {
|
||||
if (files.length > 0 && workerArgs.ffargs && workerArgs.output) {
|
||||
await runRemuxWorker(
|
||||
workerId,
|
||||
parentId,
|
||||
files,
|
||||
workerArgs.ffargs,
|
||||
workerArgs.output,
|
||||
workerArgs.filename
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user