diff --git a/layouts/default.vue b/layouts/default.vue index 243aac920..29520470c 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -326,8 +326,6 @@ export default { await this.$store.dispatch('setupNetworkListener') - await this.$store.dispatch('globals/loadLocalMediaProgress') - if (this.$store.state.user.serverConnectionConfig) { await this.initLibraries() } else { diff --git a/pages/bookshelf/index.vue b/pages/bookshelf/index.vue index 4e33c2954..c41ddfc6b 100644 --- a/pages/bookshelf/index.vue +++ b/pages/bookshelf/index.vue @@ -327,14 +327,15 @@ export default { this.$eventBus.$off('library-changed', this.libraryChanged) } }, - mounted() { - this.initListeners() - console.log(`[categories] mounted so fetching categories`) - this.fetchCategories() - + async mounted() { if (this.$route.query.error) { this.$toast.error(this.$route.query.error) } + + this.initListeners() + await this.$store.dispatch('globals/loadLocalMediaProgress') + console.log(`[categories] mounted so fetching categories`) + this.fetchCategories() }, beforeDestroy() { this.removeListeners()