mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-16 10:58:16 +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 (typeof item['pubDate'] === 'string') {
|
||||
episode.pubDate = item['pubDate']
|
||||
} else if (Array.isArray(item['pubDate'])) {
|
||||
const pubDateObj = extractFirstArrayItem(item, 'pubDate')
|
||||
if (pubDateObj && typeof pubDateObj._ === 'string') {
|
||||
episode.pubDate = pubDateObj._
|
||||
}
|
||||
const pubDate = extractFirstArrayItem(item, 'pubDate')
|
||||
if (typeof pubDate === 'string') {
|
||||
episode.pubDate = pubDate
|
||||
} else if (pubDate && typeof pubDate._ === 'string') {
|
||||
episode.pubDate = pubDate._
|
||||
} else {
|
||||
Logger.error(`[podcastUtils] Invalid pubDate ${item['pubDate']} for ${episode.enclosure.url}`)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user