From fe9168c6cf505e9c632f662ae0db14256e5fbe93 Mon Sep 17 00:00:00 2001 From: ISO-B <3048685+ISO-B@users.noreply.github.com> Date: Thu, 31 Oct 2024 21:14:25 +0200 Subject: [PATCH] Changed network connection check logic Network connection no longer requires internet connection. Socket connection status is used instead for checking if server is reachable. If there is no socket connection available eq. before connecting to server then connection type is used to for netrork connection check. --- components/app/Appbar.vue | 8 +++--- components/tables/podcast/EpisodesTable.vue | 8 +++--- pages/bookshelf/add-podcast.vue | 8 +++--- store/index.js | 30 ++++++++++++--------- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/components/app/Appbar.vue b/components/app/Appbar.vue index fee86c0b..af10a670 100644 --- a/components/app/Appbar.vue +++ b/components/app/Appbar.vue @@ -7,7 +7,7 @@ arrow_back -
+

{{ currentLibraryName }}

@@ -54,8 +54,8 @@ export default { this.$store.commit('setCastAvailable', val) } }, - networkConnected() { - return this.$store.state.networkConnected + socketConnected() { + return this.$store.state.socketConnected }, currentLibrary() { return this.$store.getters['libraries/getCurrentLibrary'] @@ -160,4 +160,4 @@ export default { transform: translate(10px, 0); } } - \ No newline at end of file + diff --git a/components/tables/podcast/EpisodesTable.vue b/components/tables/podcast/EpisodesTable.vue index c730cf46..5deb98ef 100644 --- a/components/tables/podcast/EpisodesTable.vue +++ b/components/tables/podcast/EpisodesTable.vue @@ -101,8 +101,8 @@ export default { isAdminOrUp() { return this.$store.getters['user/getIsAdminOrUp'] }, - networkConnected() { - return this.$store.state.networkConnected + socketConnected() { + return this.$store.state.socketConnected }, libraryItemId() { return this.libraryItem?.id || null @@ -233,7 +233,7 @@ export default { } }, async searchEpisodes() { - if (!this.networkConnected) { + if (!this.socketConnected) { return this.$toast.error(this.$strings.MessageNoNetworkConnection) } @@ -314,4 +314,4 @@ export default { this.$socket.$off('episode_download_finished', this.episodeDownloadFinished) } } - \ No newline at end of file + diff --git a/pages/bookshelf/add-podcast.vue b/pages/bookshelf/add-podcast.vue index cff78b5e..4c18b35f 100644 --- a/pages/bookshelf/add-podcast.vue +++ b/pages/bookshelf/add-podcast.vue @@ -3,11 +3,11 @@