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.
This commit is contained in:
ISO-B 2024-10-31 21:14:25 +02:00
parent f7663fc17f
commit fe9168c6cf
4 changed files with 29 additions and 25 deletions

View file

@ -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)
}
}
</script>
</script>