Skip to content

Commit

Permalink
Fix:Audio player cover art aspect ratio changes with library #2870
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Apr 23, 2024
1 parent bd06b6c commit 2cb53fa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/components/app/MediaPlayerContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,11 @@ export default {
sleepTimer: null,
displayTitle: null,
currentPlaybackRate: 1,
syncFailedToast: null
syncFailedToast: null,
coverAspectRatio: 1
}
},
computed: {
coverAspectRatio() {
return this.$store.getters['libraries/getBookCoverAspectRatio']
},
isSquareCover() {
return this.coverAspectRatio === 1
},
Expand Down Expand Up @@ -457,6 +455,9 @@ export default {
episodeId,
queueItems: payload.queueItems || []
})
// Set cover aspect ratio for this item's library since the library may change
this.coverAspectRatio = this.$store.getters['libraries/getBookCoverAspectRatio']
this.$nextTick(() => {
if (this.$refs.audioPlayer) this.$refs.audioPlayer.checkUpdateChapterTrack()
})
Expand Down

0 comments on commit 2cb53fa

Please sign in to comment.