Add displayTitle and displayAuthor to playback session

This commit is contained in:
advplyr
2022-04-02 10:26:42 -05:00
parent 9ae71615bc
commit 3d3f20296c
5 changed files with 37 additions and 7 deletions
+8
View File
@@ -408,5 +408,13 @@ class Book {
return tracklist
}
getPlaybackTitle() {
return this.metadata.title
}
getPlaybackAuthor() {
return this.metadata.authorName
}
}
module.exports = Book
+10
View File
@@ -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