mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 11:21:36 +00:00
Add infra to handle with feed healthy
This commit is contained in:
parent
102c90c4e8
commit
2b3c3cd088
6 changed files with 412 additions and 365 deletions
|
|
@ -485,16 +485,16 @@ export default {
|
|||
return this.$toast.error('Podcast does not have an RSS Feed')
|
||||
}
|
||||
this.fetchingRSSFeed = true
|
||||
var payload = await this.$axios.$post(`/api/podcasts/feed`, { rssFeed: this.mediaMetadata.feedUrl }).catch((error) => {
|
||||
var payload = await this.$axios.get(`/api/podcasts/${this.libraryItemId}/feed`).catch((error) => {
|
||||
console.error('Failed to get feed', error)
|
||||
this.$toast.error('Failed to get podcast feed')
|
||||
return null
|
||||
})
|
||||
this.fetchingRSSFeed = false
|
||||
if (!payload) return
|
||||
if (!payload || !payload.data) return
|
||||
|
||||
console.log('Podcast feed', payload)
|
||||
const podcastfeed = payload.podcast
|
||||
console.log('Podcast feed', payload.data)
|
||||
const podcastfeed = payload.data.podcast
|
||||
if (!podcastfeed.episodes || !podcastfeed.episodes.length) {
|
||||
this.$toast.info('No episodes found in RSS feed')
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue