-
{{ bookmarks.length ? 'bookmark' : 'bookmark_border' }}
+
{{ bookmarks.length ? 'bookmark' : 'bookmark_border' }}
bookmark
@@ -115,7 +115,7 @@ export default {
},
sleepTimerRunning: Boolean,
sleepTimeRemaining: Number,
- isServerItem: Boolean
+ serverLibraryItemId: String
},
data() {
return {
@@ -391,7 +391,7 @@ export default {
},
clickTitleAndAuthor() {
if (!this.showFullscreen) return
- const llid = this.libraryItem ? this.libraryItem.id : this.localLibraryItem ? this.localLibraryItem.id : null
+ const llid = this.serverLibraryItemId || this.libraryItem?.id || this.localLibraryItem?.id
if (llid) {
this.$router.push(`/item/${llid}`)
this.showFullscreen = false
diff --git a/components/app/AudioPlayerContainer.vue b/components/app/AudioPlayerContainer.vue
index 623b72ed..29fff400 100644
--- a/components/app/AudioPlayerContainer.vue
+++ b/components/app/AudioPlayerContainer.vue
@@ -1,6 +1,6 @@
-
(currentTime = t)" @showSleepTimer="showSleepTimer" @showBookmarks="showBookmarks" />
+ (currentTime = t)" @showSleepTimer="showSleepTimer" @showBookmarks="showBookmarks" />
diff --git a/pages/item/_id/index.vue b/pages/item/_id/index.vue
index 798d0b87..27752d74 100644
--- a/pages/item/_id/index.vue
+++ b/pages/item/_id/index.vue
@@ -602,7 +602,7 @@ export default {
} else if (this.isLocal) {
localEpisode = episode
}
- const serverEpisodeId = !this.isLocal ? episodeId : localEpisode ? localEpisode.serverEpisodeId : null
+ const serverEpisodeId = !this.isLocal ? episodeId : localEpisode?.serverEpisodeId || null
if (serverEpisodeId && this.serverLibraryItemId && this.isCasting) {
// If casting and connected to server for local library item then send server library item id
@@ -837,9 +837,19 @@ export default {
console.log('RSS Feed Closed', data)
this.rssFeed = null
}
+ },
+ async setLibrary() {
+ if (!this.libraryItem.libraryId) return
+ await this.$store.dispatch('libraries/fetch', this.libraryItem.libraryId)
+ this.$localStore.setLastLibraryId(this.libraryItem.libraryId)
}
},
mounted() {
+ // If library of this item is different from current library then switch libraries
+ if (this.$store.state.libraries.currentLibraryId !== this.libraryItem.libraryId) {
+ this.setLibrary()
+ }
+
this.windowWidth = window.innerWidth
window.addEventListener('resize', this.windowResized)
this.$eventBus.$on('library-changed', this.libraryChanged)