Fix:Large OPML import timeouts #3118

- Added OPML Api endpoints for /parse and /create, removed old
- Show task for OPML import and create failed tasks for failed feeds
This commit is contained in:
advplyr 2024-07-16 17:05:52 -05:00
parent b1bc472205
commit 37ad1cced2
9 changed files with 258 additions and 93 deletions

View file

@ -113,18 +113,23 @@ export default {
return
}
await this.$axios
.$post(`/api/podcasts/opml`, { opmlText: txt })
this.$axios
.$post(`/api/podcasts/opml/parse`, { opmlText: txt })
.then((data) => {
console.log(data)
this.opmlFeeds = data.feeds || []
this.showOPMLFeedsModal = true
if (!data.feeds?.length) {
this.$toast.error('No feeds found in OPML file')
} else {
this.opmlFeeds = data.feeds || []
this.showOPMLFeedsModal = true
}
})
.catch((error) => {
console.error('Failed', error)
this.$toast.error('Failed to parse OPML file')
})
this.processing = false
.finally(() => {
this.processing = false
})
},
submit() {
if (!this.searchInput) return