diff --git a/components/cards/LazyListBookCard.vue b/components/cards/LazyListBookCard.vue index 7453f524..f58f507f 100644 --- a/components/cards/LazyListBookCard.vue +++ b/components/cards/LazyListBookCard.vue @@ -30,8 +30,13 @@

-
@@ -234,6 +239,14 @@ export default { playerIsPlaying() { return this.store.state.playerIsPlaying && (this.isStreaming || this.isPlaying) }, + playerIsStartingPlayback() { + // Play has been pressed and waiting for native play response + return this.store.state.playerIsStartingPlayback + }, + playerIsStartingForThisMedia() { + const mediaId = this.store.state.playerStartingPlaybackMediaId + return mediaId === this.libraryItemId + }, isCasting() { return this.store.state.isCasting }, @@ -312,6 +325,8 @@ export default { this.$emit('select', this.libraryItem) }, async play() { + if (this.playerIsStartingPlayback) return + const hapticsImpact = this.$hapticsImpact || this.$nuxt.$hapticsImpact if (hapticsImpact) { await hapticsImpact() @@ -332,7 +347,7 @@ export default { libraryItemId = this.localLibraryItem.id } - this.store.commit('setPlayerIsStartingPlayback', libraryItemId) + this.store.commit('setPlayerIsStartingPlayback', this.libraryItemId) eventBus.$emit('play-item', { libraryItemId, serverLibraryItemId: this.libraryItemId }) } },