mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
Fix:Podcast pubDate parsing #1116
This commit is contained in:
parent
8319891c96
commit
3282ac67e4
@ -96,13 +96,11 @@ function extractEpisodeData(item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item['pubDate']) {
|
if (item['pubDate']) {
|
||||||
if (typeof item['pubDate'] === 'string') {
|
const pubDate = extractFirstArrayItem(item, 'pubDate')
|
||||||
episode.pubDate = item['pubDate']
|
if (typeof pubDate === 'string') {
|
||||||
} else if (Array.isArray(item['pubDate'])) {
|
episode.pubDate = pubDate
|
||||||
const pubDateObj = extractFirstArrayItem(item, 'pubDate')
|
} else if (pubDate && typeof pubDate._ === 'string') {
|
||||||
if (pubDateObj && typeof pubDateObj._ === 'string') {
|
episode.pubDate = pubDate._
|
||||||
episode.pubDate = pubDateObj._
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Logger.error(`[podcastUtils] Invalid pubDate ${item['pubDate']} for ${episode.enclosure.url}`)
|
Logger.error(`[podcastUtils] Invalid pubDate ${item['pubDate']} for ${episode.enclosure.url}`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user