mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-06 09:21:37 +00:00
Compare commits
No commits in common. "0ae73408898760ff85de33cd07576aad463d7a12" and "878f0787ba39ff82f9d5b6b5b5bb397ec667f010" have entirely different histories.
0ae7340889
...
878f0787ba
2 changed files with 1 additions and 7 deletions
|
|
@ -288,12 +288,7 @@ class SessionController {
|
|||
return res.sendStatus(404)
|
||||
}
|
||||
|
||||
let audioTrack = playbackSession.audioTracks.find((t) => toNumber(t.index, 1) === audioTrackIndex)
|
||||
|
||||
// Support clients passing 0 or 1 for podcast episode audio track index (handles old episodes pre-v2.21.0 having null index)
|
||||
if (!audioTrack && playbackSession.mediaType === 'podcast' && audioTrackIndex === 0) {
|
||||
audioTrack = playbackSession.audioTracks[0]
|
||||
}
|
||||
const audioTrack = playbackSession.audioTracks.find((t) => t.index === audioTrackIndex)
|
||||
if (!audioTrack) {
|
||||
Logger.error(`[SessionController] Unable to find audio track with index=${audioTrackIndex}`)
|
||||
return res.sendStatus(404)
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ class PodcastEpisode extends Model {
|
|||
const track = structuredClone(this.audioFile)
|
||||
track.startOffset = 0
|
||||
track.title = this.audioFile.metadata.filename
|
||||
track.index = 1 // Podcast episodes only have one track
|
||||
track.contentUrl = `/api/items/${libraryItemId}/file/${track.ino}`
|
||||
return track
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue