diff --git a/packages/server/classes/Transformation/handlers/mq-hls.js b/packages/server/classes/Transformation/handlers/mq-hls.js index e10ea1d0..93bf924d 100644 --- a/packages/server/classes/Transformation/handlers/mq-hls.js +++ b/packages/server/classes/Transformation/handlers/mq-hls.js @@ -2,7 +2,7 @@ import path from "node:path" import MultiqualityHLSJob from "@shared-classes/MultiqualityHLSJob" export default async ({ filePath, workPath, onProgress }) => { - return new Promise(async (resolve, reject) => { + return new Promise((resolve, reject) => { const outputDir = path.resolve(workPath, "mqhls") const job = new MultiqualityHLSJob({ @@ -40,6 +40,10 @@ export default async ({ filePath, workPath, onProgress }) => { } }) + job.on("error", (error) => { + reject(error) + }) + job.run() }) }