audiobookshelf/server/utils/probeWorker.js

9 lines
238 B
JavaScript
Raw Normal View History

const { parentPort } = require("worker_threads")
const prober = require('./prober')
parentPort.on("message", async ({ mediaPath }) => {
const results = await prober.probe(mediaPath)
parentPort.postMessage({
data: results,
})
})