Update:Add chapters to playback session so they can be used for podcast episodes in mobile apps

This commit is contained in:
advplyr
2023-05-20 13:30:07 -05:00
parent 92bb2fb23d
commit f4f5f79af7
3 changed files with 9 additions and 1 deletions

View File

@ -177,7 +177,7 @@ class PlaybackSession {
this.episodeId = episodeId
this.mediaType = libraryItem.mediaType
this.mediaMetadata = libraryItem.media.metadata.clone()
this.chapters = (libraryItem.media.chapters || []).map(c => ({ ...c })) // Only book mediaType has chapters
this.chapters = libraryItem.media.getChapters(episodeId)
this.displayTitle = libraryItem.media.getPlaybackTitle(episodeId)
this.displayAuthor = libraryItem.media.getPlaybackAuthor()
this.coverPath = libraryItem.media.coverPath