Update: "failed to get" strings

This commit is contained in:
Nicholas Wallace 2024-08-30 11:05:29 -07:00
parent 55b2472978
commit 155e8ce878
8 changed files with 16 additions and 10 deletions

View file

@ -162,7 +162,7 @@ export default {
})
.catch((error) => {
console.error('Failed to get filesystem paths', error)
this.$toast.error('Failed to get filesystem paths')
this.$toast.error(this.$strings.ToastGetFilesystemPathsFailed)
return []
})
.finally(() => {

View file

@ -560,7 +560,7 @@ export default {
.catch((error) => {
this.findingChapters = false
console.error('Failed to get chapter data', error)
this.$toast.error('Failed to find chapters')
this.$toast.error(this.$strings.ToastGetChaptersFailed)
this.showFindChaptersModal = false
})
},

View file

@ -358,12 +358,12 @@ export default {
})
if (!libraryItem) {
this.$toast.error('Failed to get library item')
this.$toast.error(this.$strings.ToastGetLibraryItemFailed)
this.processingGoToTimestamp = false
return
}
if (session.episodeId && !libraryItem.media.episodes.some((ep) => ep.id === session.episodeId)) {
this.$toast.error('Failed to get podcast episode')
this.$toast.error(this.$strings.ToastGetPodcastEpisodeFailed)
this.processingGoToTimestamp = false
return
}

View file

@ -127,12 +127,12 @@ export default {
})
if (!libraryItem) {
this.$toast.error('Failed to get library item')
this.$toast.error(this.$strings.ToastGetLibraryItemFailed)
this.processingGoToTimestamp = false
return
}
if (session.episodeId && !libraryItem.media.episodes.some((ep) => ep.id === session.episodeId)) {
this.$toast.error('Failed to get podcast episode')
this.$toast.error(this.$strings.ToastGetPodcastEpisodeFailed)
this.processingGoToTimestamp = false
return
}

View file

@ -111,7 +111,7 @@ export default {
this.processing = true
const queuePayload = await this.$axios.$get(`/api/libraries/${this.libraryId}/episode-downloads`).catch((error) => {
console.error('Failed to get download queue', error)
this.$toast.error('Failed to get download queue')
this.$toast.error(this.$strings.ToastGetDownloadQueueFailed)
return null
})
this.processing = false

View file

@ -211,7 +211,7 @@ export default {
this.processing = true
const episodePayload = await this.$axios.$get(`/api/libraries/${this.libraryId}/recent-episodes?limit=25&page=${page}`).catch((error) => {
console.error('Failed to get recent episodes', error)
this.$toast.error('Failed to get recent episodes')
this.$toast.error(this.$strings.ToastGetRecentEpisodesFailed)
return null
})
this.processing = false

View file

@ -146,7 +146,7 @@ export default {
this.processing = true
var payload = await this.$axios.$post(`/api/podcasts/feed`, { rssFeed }).catch((error) => {
console.error('Failed to get feed', error)
this.$toast.error('Failed to get podcast feed')
this.$toast.error(this.$strings.ToastPodcastGetFeedFailed)
return null
})
this.processing = false
@ -197,7 +197,7 @@ export default {
this.processing = true
const payload = await this.$axios.$post(`/api/podcasts/feed`, { rssFeed: podcast.feedUrl }).catch((error) => {
console.error('Failed to get feed', error)
this.$toast.error('Failed to get podcast feed')
this.$toast.error(this.$strings.ToastPodcastGetFeedFailed)
return null
})
this.processing = false

View file

@ -869,6 +869,12 @@
"ToastFailedToUpdateAccount": "Failed to update account",
"ToastFailedToUpdateUser": "Failed to update user",
"ToastFfprobeFailed": "FFprobe failed",
"ToastGetChaptersFailed": "Failed to get chapters",
"ToastGetDownloadQueueFailed": "Failed to get download queue",
"ToastGetFilesystemPathsFailed": "Failed to get filesystem paths",
"ToastGetLibraryItemFailed": "Failed to get library item",
"ToastGetPodcastEpisodeFailed": "Failed to get podcast episode",
"ToastGetRecentEpisodesFailed": "Failed to get recent episodes",
"ToastInvalidImageUrl": "Invalid image URL",
"ToastInvalidUrl": "Invalid URL",
"ToastItemCoverUpdateFailed": "Failed to update item cover",