Update merge for m4b files, add progress event for local audiobooks

This commit is contained in:
advplyr 2021-09-11 19:59:48 -05:00
parent beaa1e14bb
commit c30955f909
5 changed files with 18 additions and 2 deletions

View file

@ -117,6 +117,7 @@ class DownloadManager {
const logLevel = process.env.NODE_ENV === 'production' ? 'error' : 'warning'
var ffmpegOptions = [`-loglevel ${logLevel}`]
var ffmpegOutputOptions = []
if (requiresEncode) {
ffmpegOptions = ffmpegOptions.concat([
@ -128,6 +129,10 @@ class DownloadManager {
])
} else {
ffmpegOptions.push('-c copy')
if (download.ext === '.m4b') {
Logger.info('Concat m4b\'s use -f mp4')
ffmpegOutputOptions.push('-f mp4')
}
}
if (download.includeMetadata) {
@ -153,6 +158,7 @@ class DownloadManager {
var workerData = {
inputs: ffmpegInputs,
options: ffmpegOptions,
outputOptions: ffmpegOutputOptions,
output: download.fullPath,
}