From feec7f7399998b96ea601c1ed19563167ba0a9de Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 11 Dec 2022 12:01:54 -0600 Subject: [PATCH] Add:Sync local media progress button on local media page --- components/app/AudioPlayer.vue | 8 +++-- layouts/default.vue | 2 +- pages/localMedia/folders/index.vue | 53 +++++++++++++++++++++++++++--- store/user.js | 3 ++ 4 files changed, 57 insertions(+), 9 deletions(-) diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index f069a268..60a9a56e 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -766,9 +766,11 @@ export default { screenOrientationChange() { setTimeout(() => { this.updateScreenSize() - this.trackWidth = this.$refs.track.clientWidth - this.updateTrack() - this.updateReadyTrack() + if (this.$refs.track) { + this.trackWidth = this.$refs.track.clientWidth + this.updateTrack() + this.updateReadyTrack() + } }, 50) }, updateScreenSize() { diff --git a/layouts/default.vue b/layouts/default.vue index 19dee180..1f5a76d6 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -175,7 +175,7 @@ export default { } console.log('[default] Calling syncLocalMediaProgress') - var response = await this.$db.syncLocalMediaProgressWithServer() + const response = await this.$db.syncLocalMediaProgressWithServer() if (!response) { if (this.$platform != 'web') this.$toast.error('Failed to sync local media with server') this.$store.commit('setLastLocalMediaSyncResults', null) diff --git a/pages/localMedia/folders/index.vue b/pages/localMedia/folders/index.vue index d6b09ce4..5b28a304 100644 --- a/pages/localMedia/folders/index.vue +++ b/pages/localMedia/folders/index.vue @@ -1,5 +1,10 @@