diff --git a/client/components/app/StreamContainer.vue b/client/components/app/StreamContainer.vue index d7f7cdbf..f6e2dcb0 100644 --- a/client/components/app/StreamContainer.vue +++ b/client/components/app/StreamContainer.vue @@ -10,7 +10,8 @@
+
{{ podcastAuthor }}
+
Unknown
@@ -113,6 +114,12 @@ export default { media() { return this.streamLibraryItem ? this.streamLibraryItem.media || {} : {} }, + isPodcast() { + return this.streamLibraryItem ? this.streamLibraryItem.mediaType === 'podcast' : false + }, + episode() { + return this.playerHandler.episode + }, mediaMetadata() { return this.media.metadata || {} }, @@ -120,6 +127,7 @@ export default { return this.media.chapters || [] }, title() { + if (this.episode) return this.episode.title return this.mediaMetadata.title || 'No Title' }, authors() { @@ -130,6 +138,10 @@ export default { }, totalDurationPretty() { return this.$secondsToTimestamp(this.totalDuration) + }, + podcastAuthor() { + if (!this.isPodcast) return null + return this.mediaMetadata.author || 'Unknown' } }, methods: { diff --git a/client/players/PlayerHandler.js b/client/players/PlayerHandler.js index 68caac9d..fe6de36e 100644 --- a/client/players/PlayerHandler.js +++ b/client/players/PlayerHandler.js @@ -39,6 +39,10 @@ export default class PlayerHandler { get playerPlaying() { return this.playerState === 'PLAYING' } + get episode() { + if (!this.episodeId) return null + return this.libraryItem.media.episodes.find(ep => ep.id === this.episodeId) + } load(libraryItem, episodeId, playWhenReady) { if (!this.player) this.switchPlayer()