mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-28 06:39:39 +00:00
Add displayTitle and displayAuthor to playback session
This commit is contained in:
parent
9ae71615bc
commit
3d3f20296c
5 changed files with 37 additions and 7 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue