From 2cb53fafd7dc5cbcfa83bf8ecbd0bf4e91f85fd0 Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 23 Apr 2024 17:12:13 -0500 Subject: [PATCH] Fix:Audio player cover art aspect ratio changes with library #2870 --- client/components/app/MediaPlayerContainer.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/components/app/MediaPlayerContainer.vue b/client/components/app/MediaPlayerContainer.vue index 081cd708..3c4b1d35 100644 --- a/client/components/app/MediaPlayerContainer.vue +++ b/client/components/app/MediaPlayerContainer.vue @@ -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 }, @@ -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() })