mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-28 22:08:47 +02:00
Fix:Close playback when logging out
This commit is contained in:
parent
72f10e5f42
commit
d64dd63ea4
3 changed files with 7 additions and 5 deletions
|
@ -18,8 +18,8 @@
|
||||||
<widgets-download-progress-indicator />
|
<widgets-download-progress-indicator />
|
||||||
|
|
||||||
<!-- Must be connected to a server to cast, only supports media items on server -->
|
<!-- Must be connected to a server to cast, only supports media items on server -->
|
||||||
<div v-show="isCastAvailable && user" class="mx-2 cursor-pointer">
|
<div v-show="isCastAvailable && user" class="mx-2 cursor-pointer mt-1">
|
||||||
<span class="material-icons" :class="isCasting ? 'text-success' : ''" style="font-size: 1.75rem" @click="castClick">cast</span>
|
<span class="material-icons" :class="isCasting ? 'text-success' : ''" style="font-size: 1.6rem" @click="castClick">cast</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nuxt-link v-if="user" class="h-7 mx-2" to="/search">
|
<nuxt-link v-if="user" class="h-7 mx-2" to="/search">
|
||||||
|
|
|
@ -634,6 +634,11 @@ export default {
|
||||||
this.$nextTick(this.init)
|
this.$nextTick(this.init)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
if (this.playbackSession) {
|
||||||
|
console.log('[AudioPlayer] Before destroy closing playback')
|
||||||
|
this.closePlayback()
|
||||||
|
}
|
||||||
|
|
||||||
this.forceCloseDropdownMenu()
|
this.forceCloseDropdownMenu()
|
||||||
document.body.removeEventListener('touchstart', this.touchstart)
|
document.body.removeEventListener('touchstart', this.touchstart)
|
||||||
document.body.removeEventListener('touchend', this.touchend)
|
document.body.removeEventListener('touchend', this.touchend)
|
||||||
|
|
|
@ -21,9 +21,6 @@ export const state = () => ({
|
||||||
})
|
})
|
||||||
|
|
||||||
export const getters = {
|
export const getters = {
|
||||||
playerIsOpen: (state) => {
|
|
||||||
return state.streamAudiobook
|
|
||||||
},
|
|
||||||
getIsItemStreaming: state => libraryItemId => {
|
getIsItemStreaming: state => libraryItemId => {
|
||||||
return state.playerLibraryItemId == libraryItemId
|
return state.playerLibraryItemId == libraryItemId
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue