mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Possible fix for issue #1004
This commit is contained in:
parent
0ef2a2e4b6
commit
022c506eda
@ -20,7 +20,14 @@ module.exports = (function () {
|
|||||||
|
|
||||||
proc.on('exit', code => { exitCode = code })
|
proc.on('exit', code => { exitCode = code })
|
||||||
proc.on('error', err => reject(err))
|
proc.on('error', err => reject(err))
|
||||||
proc.on('close', () => resolve(JSON.parse(probeData.join(''))))
|
proc.on('close', () => {
|
||||||
|
try {
|
||||||
|
let result = JSON.parse(probeData.join(''))
|
||||||
|
resolve(result);
|
||||||
|
} catch (err) {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user