Update:Show error when searching for episodes with no network connection

This commit is contained in:
advplyr
2022-12-10 10:32:16 -06:00
parent d10f33362e
commit 7ba810adb8
+7 -1
View File
@@ -134,6 +134,9 @@ export default {
isAdminOrUp() { isAdminOrUp() {
return this.$store.getters['user/getIsAdminOrUp'] return this.$store.getters['user/getIsAdminOrUp']
}, },
networkConnected() {
return this.$store.state.networkConnected
},
libraryItemId() { libraryItemId() {
return this.libraryItem ? this.libraryItem.id : null return this.libraryItem ? this.libraryItem.id : null
}, },
@@ -208,6 +211,10 @@ export default {
} }
}, },
async searchEpisodes() { async searchEpisodes() {
if (!this.networkConnected) {
return this.$toast.error('No network connection')
}
if (!this.mediaMetadata.feedUrl) { if (!this.mediaMetadata.feedUrl) {
return this.$toast.error('Podcast does not have an RSS Feed') return this.$toast.error('Podcast does not have an RSS Feed')
} }
@@ -236,7 +243,6 @@ export default {
}, },
setFilter(filter) { setFilter(filter) {
this.filterKey = filter this.filterKey = filter
console.log('Set filter', this.filterKey)
this.showFiltersModal = false this.showFiltersModal = false
}, },
showFilters() { showFilters() {