Update item image in audio player when updated on item #4025
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Run Component Tests / Run Component Tests (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled

This commit is contained in:
advplyr 2025-04-01 17:32:21 -05:00
parent 96825c3c2b
commit ddf2ca3670
3 changed files with 9 additions and 2 deletions

View file

@ -183,7 +183,7 @@ export default {
this.$store.commit('libraries/updateFilterDataWithItem', libraryItem)
},
libraryItemUpdated(libraryItem) {
if (this.$store.state.selectedLibraryItem && this.$store.state.selectedLibraryItem.id === libraryItem.id) {
if (this.$store.state.selectedLibraryItem?.id === libraryItem.id) {
this.$store.commit('setSelectedLibraryItem', libraryItem)
if (this.$store.state.globals.selectedEpisode && libraryItem.mediaType === 'podcast') {
const episode = libraryItem.media.episodes.find((ep) => ep.id === this.$store.state.globals.selectedEpisode.id)
@ -192,6 +192,9 @@ export default {
}
}
}
if (this.$store.state.streamLibraryItem?.id === libraryItem.id) {
this.$store.commit('updateStreamLibraryItem', libraryItem)
}
this.$eventBus.$emit(`${libraryItem.id}_updated`, libraryItem)
this.$store.commit('libraries/updateFilterDataWithItem', libraryItem)
},