Fix:Audio player cover art aspect ratio changes with library #2870

This commit is contained in:
advplyr 2024-04-23 17:12:13 -05:00
parent bd06b6c716
commit 2cb53fafd7

View File

@ -82,13 +82,11 @@ export default {
sleepTimer: null, sleepTimer: null,
displayTitle: null, displayTitle: null,
currentPlaybackRate: 1, currentPlaybackRate: 1,
syncFailedToast: null syncFailedToast: null,
coverAspectRatio: 1
} }
}, },
computed: { computed: {
coverAspectRatio() {
return this.$store.getters['libraries/getBookCoverAspectRatio']
},
isSquareCover() { isSquareCover() {
return this.coverAspectRatio === 1 return this.coverAspectRatio === 1
}, },
@ -457,6 +455,9 @@ export default {
episodeId, episodeId,
queueItems: payload.queueItems || [] 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(() => { this.$nextTick(() => {
if (this.$refs.audioPlayer) this.$refs.audioPlayer.checkUpdateChapterTrack() if (this.$refs.audioPlayer) this.$refs.audioPlayer.checkUpdateChapterTrack()
}) })