Add:OPML Export #1260

This commit is contained in:
advplyr 2023-05-28 15:10:34 -05:00
parent 019063e6f4
commit 15aaf2863c
16 changed files with 124 additions and 40 deletions

View file

@ -848,6 +848,12 @@ class LibraryController {
res.json(payload)
}
getOPMLFile(req, res) {
const opmlText = this.podcastManager.generateOPMLFileText(req.libraryItems)
res.type('application/xml')
res.send(opmlText)
}
middleware(req, res, next) {
if (!req.user.checkCanAccessLibrary(req.params.id)) {
Logger.warn(`[LibraryController] Library ${req.params.id} not accessible to user ${req.user.username}`)

View file

@ -109,7 +109,7 @@ class PodcastController {
res.json({ podcast })
}
async getOPMLFeeds(req, res) {
async getFeedsFromOPMLText(req, res) {
if (!req.body.opmlText) {
return res.sendStatus(400)
}