mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 17:59:06 +02:00
Fix:Sanitize new podcast folder names and ensure feedUrl is in feed metadata #589
This commit is contained in:
parent
578a946ca5
commit
113026ce13
4 changed files with 17 additions and 5 deletions
|
@ -1,9 +1,10 @@
|
|||
const axios = require('axios')
|
||||
const fs = require('fs-extra')
|
||||
const Path = require('path')
|
||||
const Logger = require('../Logger')
|
||||
const { parsePodcastRssFeedXml } = require('../utils/podcastUtils')
|
||||
const LibraryItem = require('../objects/LibraryItem')
|
||||
const { getFileTimestampsWithIno } = require('../utils/fileUtils')
|
||||
const { getFileTimestampsWithIno, sanitizeFilename } = require('../utils/fileUtils')
|
||||
const filePerms = require('../utils/filePerms')
|
||||
|
||||
class PodcastController {
|
||||
|
@ -107,6 +108,12 @@ class PodcastController {
|
|||
if (!payload) {
|
||||
return res.status(500).send('Invalid podcast RSS feed')
|
||||
}
|
||||
|
||||
if (!payload.podcast.metadata.feedUrl) {
|
||||
// Not every RSS feed will put the feed url in their metadata
|
||||
payload.podcast.metadata.feedUrl = url
|
||||
}
|
||||
|
||||
res.json(payload)
|
||||
}).catch((error) => {
|
||||
console.error('Failed', error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue