mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-18 06:54:15 +00:00
handle transformations errors
This commit is contained in:
parent
12a9b8eba8
commit
92051c4d3a
@ -2,7 +2,7 @@ import path from "node:path"
|
|||||||
import SegmentedAudioMPDJob from "@shared-classes/SegmentedAudioMPDJob"
|
import SegmentedAudioMPDJob from "@shared-classes/SegmentedAudioMPDJob"
|
||||||
|
|
||||||
export default async ({ filePath, workPath, onProgress }) => {
|
export default async ({ filePath, workPath, onProgress }) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve, reject) => {
|
||||||
const outputDir = path.resolve(workPath, "a-dash")
|
const outputDir = path.resolve(workPath, "a-dash")
|
||||||
|
|
||||||
const job = new SegmentedAudioMPDJob({
|
const job = new SegmentedAudioMPDJob({
|
||||||
@ -28,6 +28,10 @@ export default async ({ filePath, workPath, onProgress }) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
job.on("error", (error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
|
||||||
job.run()
|
job.run()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user