mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-03 16:59:41 +00:00
Update:Add chapters to playback session so they can be used for podcast episodes in mobile apps
This commit is contained in:
parent
92bb2fb23d
commit
f4f5f79af7
3 changed files with 9 additions and 1 deletions
|
|
@ -528,5 +528,9 @@ class Book {
|
|||
getPlaybackAuthor() {
|
||||
return this.metadata.authorName
|
||||
}
|
||||
|
||||
getChapters() {
|
||||
return this.chapters?.map(ch => ({ ...ch })) || []
|
||||
}
|
||||
}
|
||||
module.exports = Book
|
||||
|
|
|
|||
|
|
@ -339,5 +339,9 @@ class Podcast {
|
|||
if (!audioFile?.metaTags) return false
|
||||
return this.metadata.setDataFromAudioMetaTags(audioFile.metaTags, overrideExistingDetails)
|
||||
}
|
||||
|
||||
getChapters(episodeId) {
|
||||
return this.getEpisode(episodeId)?.chapters?.map(ch => ({ ...ch })) || []
|
||||
}
|
||||
}
|
||||
module.exports = Podcast
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue