Merge branch 'master' into mf/rssInboundManager

This commit is contained in:
mfcar 2023-10-03 23:14:22 +01:00
commit 646f66d610
No known key found for this signature in database
6 changed files with 14 additions and 15 deletions

View file

@ -168,7 +168,13 @@ class PlaybackSession {
this.currentTime = session.currentTime || 0
this.startedAt = session.startedAt
this.updatedAt = session.updatedAt || null
this.updatedAt = session.updatedAt || session.startedAt
// Local playback sessions dont set this date field so set using updatedAt
if (!this.date && session.updatedAt) {
this.date = date.format(new Date(session.updatedAt), 'YYYY-MM-DD')
this.dayOfWeek = date.format(new Date(session.updatedAt), 'dddd')
}
}
get mediaItemId() {

View file

@ -339,9 +339,9 @@ class Stream extends EventEmitter {
} else {
Logger.error('Ffmpeg Err', '"' + err.message + '"')
// Temporary workaround for https://github.com/advplyr/audiobookshelf/issues/172
const aacErrorMsg = 'ffmpeg exited with code 1: Could not write header for output file #0 (incorrect codec parameters ?)'
if (audioCodec === 'copy' && this.isAACEncodable && err.message && err.message.startsWith(aacErrorMsg)) {
// Temporary workaround for https://github.com/advplyr/audiobookshelf/issues/172 and https://github.com/advplyr/audiobookshelf/issues/2157
const aacErrorMsg = 'ffmpeg exited with code 1:'
if (audioCodec === 'copy' && this.isAACEncodable && err.message?.startsWith(aacErrorMsg)) {
Logger.info(`[Stream] Re-attempting stream with AAC encode`)
this.transcodeOptions.forceAAC = true
this.reset(this.startTime)
@ -435,4 +435,4 @@ class Stream extends EventEmitter {
return newAudioTrack
}
}
module.exports = Stream
module.exports = Stream