mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-13 15:34:50 +02:00
Fix:Play button loading indicator when offline #990
This commit is contained in:
parent
023c83ee78
commit
ecf910dc55
4 changed files with 12 additions and 6 deletions
|
@ -126,6 +126,8 @@ export default {
|
||||||
},
|
},
|
||||||
playerIsStartingForThisMedia() {
|
playerIsStartingForThisMedia() {
|
||||||
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
||||||
|
if (!mediaId) return false
|
||||||
|
|
||||||
let thisMediaId = this.episodeId || this.libraryItem.id
|
let thisMediaId = this.episodeId || this.libraryItem.id
|
||||||
return mediaId === thisMediaId
|
return mediaId === thisMediaId
|
||||||
},
|
},
|
||||||
|
|
|
@ -127,6 +127,8 @@ export default {
|
||||||
},
|
},
|
||||||
playerIsStartingForThisMedia() {
|
playerIsStartingForThisMedia() {
|
||||||
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
||||||
|
if (!mediaId) return false
|
||||||
|
|
||||||
return mediaId === this.episode?.id
|
return mediaId === this.episode?.id
|
||||||
},
|
},
|
||||||
itemProgress() {
|
itemProgress() {
|
||||||
|
|
|
@ -215,9 +215,10 @@ export default {
|
||||||
return this.$store.state.playerIsStartingPlayback
|
return this.$store.state.playerIsStartingPlayback
|
||||||
},
|
},
|
||||||
playerIsStartingForThisMedia() {
|
playerIsStartingForThisMedia() {
|
||||||
if (!this.serverEpisodeId) return false
|
|
||||||
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
||||||
return mediaId === this.serverEpisodeId
|
if (!mediaId) return false
|
||||||
|
|
||||||
|
return mediaId === this.localEpisodeId || mediaId === this.serverEpisodeId
|
||||||
},
|
},
|
||||||
userItemProgress() {
|
userItemProgress() {
|
||||||
if (this.isLocal) return this.localItemProgress
|
if (this.isLocal) return this.localItemProgress
|
||||||
|
@ -347,7 +348,7 @@ export default {
|
||||||
if (this.playerIsPlaying) {
|
if (this.playerIsPlaying) {
|
||||||
this.$eventBus.$emit('pause-item')
|
this.$eventBus.$emit('pause-item')
|
||||||
} else {
|
} else {
|
||||||
this.$store.commit('setPlayerIsStartingPlayback', this.serverEpisodeId)
|
this.$store.commit('setPlayerIsStartingPlayback', this.episode.id)
|
||||||
|
|
||||||
if (this.localEpisodeId && this.localLibraryItemId && !this.isLocal) {
|
if (this.localEpisodeId && this.localLibraryItemId && !this.isLocal) {
|
||||||
console.log('Play local episode', this.localEpisodeId, this.localLibraryItemId)
|
console.log('Play local episode', this.localEpisodeId, this.localLibraryItemId)
|
||||||
|
|
|
@ -400,11 +400,12 @@ export default {
|
||||||
},
|
},
|
||||||
playerIsStartingForThisMedia() {
|
playerIsStartingForThisMedia() {
|
||||||
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
const mediaId = this.$store.state.playerStartingPlaybackMediaId
|
||||||
|
if (!mediaId) return false
|
||||||
|
|
||||||
if (this.isPodcast) {
|
if (this.isPodcast) {
|
||||||
if (!this.episodeStartingPlayback) return false
|
|
||||||
return mediaId === this.episodeStartingPlayback
|
return mediaId === this.episodeStartingPlayback
|
||||||
} else {
|
} else {
|
||||||
return mediaId === this.serverLibraryItemId
|
return mediaId === this.serverLibraryItemId || mediaId === this.localLibraryItemId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tracks() {
|
tracks() {
|
||||||
|
@ -561,7 +562,7 @@ export default {
|
||||||
if (!value) return
|
if (!value) return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.commit('setPlayerIsStartingPlayback', this.serverLibraryItemId)
|
this.$store.commit('setPlayerIsStartingPlayback', libraryItemId)
|
||||||
this.$eventBus.$emit('play-item', { libraryItemId, serverLibraryItemId: this.serverLibraryItemId, startTime })
|
this.$eventBus.$emit('play-item', { libraryItemId, serverLibraryItemId: this.serverLibraryItemId, startTime })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue