mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-05 02:25:45 +02:00
Fix:Switch to library of item when clicking on title of fullscreen audio player #803
This commit is contained in:
parent
72f687b079
commit
6d61b2acaf
3 changed files with 15 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue