mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-13 01:18:30 +01:00
Fix:RSS feed parser for episode metadata tags that have attributes #1996
This commit is contained in:
parent
2c9f2e0d68
commit
225dcdeafd
@ -66,7 +66,7 @@ function extractPodcastMetadata(channel) {
|
|||||||
arrayFields.forEach((key) => {
|
arrayFields.forEach((key) => {
|
||||||
const cleanKey = key.split(':').pop()
|
const cleanKey = key.split(':').pop()
|
||||||
let value = extractFirstArrayItem(channel, key)
|
let value = extractFirstArrayItem(channel, key)
|
||||||
if (value && value['_']) value = value['_']
|
if (value?.['_']) value = value['_']
|
||||||
metadata[cleanKey] = value
|
metadata[cleanKey] = value
|
||||||
})
|
})
|
||||||
return metadata
|
return metadata
|
||||||
@ -131,7 +131,9 @@ function extractEpisodeData(item) {
|
|||||||
const arrayFields = ['title', 'itunes:episodeType', 'itunes:season', 'itunes:episode', 'itunes:author', 'itunes:duration', 'itunes:explicit', 'itunes:subtitle']
|
const arrayFields = ['title', 'itunes:episodeType', 'itunes:season', 'itunes:episode', 'itunes:author', 'itunes:duration', 'itunes:explicit', 'itunes:subtitle']
|
||||||
arrayFields.forEach((key) => {
|
arrayFields.forEach((key) => {
|
||||||
const cleanKey = key.split(':').pop()
|
const cleanKey = key.split(':').pop()
|
||||||
episode[cleanKey] = extractFirstArrayItem(item, key)
|
let value = extractFirstArrayItem(item, key)
|
||||||
|
if (value?.['_']) value = value['_']
|
||||||
|
episode[cleanKey] = value
|
||||||
})
|
})
|
||||||
return episode
|
return episode
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user