mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-27 19:02:44 +01:00
Add displayTitle and displayAuthor to playback session
This commit is contained in:
1 parent
9ae71615bc
commit
3d3f20296c
5 files changed
+37
-7
No files matched your search
@@ -408,5 +408,13 @@ class Book {
|
||||
|
||||
return tracklist
|
||||
}
|
||||
|
||||
getPlaybackTitle() {
|
||||
return this.metadata.title
|
||||
}
|
||||
|
||||
getPlaybackAuthor() {
|
||||
return this.metadata.authorName
|
||||
}
|
||||
}
|
||||
module.exports = Book
|
||||
@@ -213,5 +213,15 @@ class Podcast {
|
||||
removeEpisode(episodeId) {
|
||||
this.episodes = this.episodes.filter(ep => ep.id !== episodeId)
|
||||
}
|
||||
|
||||
getPlaybackTitle(episodeId) {
|
||||
var episode = this.episodes.find(ep => ep.id == episodeId)
|
||||
if (!episode) return this.metadata.title
|
||||
return episode.title
|
||||
}
|
||||
|
||||
getPlaybackAuthor() {
|
||||
return this.metadata.author
|
||||
}
|
||||
}
|
||||
module.exports = Podcast
|
||||
Reference in new issue
Block a user