mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-01 00:18:14 +01:00
Fix:OPF parser supporting attributes on tags #1478
This commit is contained in:
parent
33846e46fa
commit
e195eec1c5
@ -22,7 +22,27 @@ function fetchCreators(creators, role) {
|
||||
|
||||
function fetchTagString(metadata, tag) {
|
||||
if (!metadata[tag] || !metadata[tag].length) return null
|
||||
const value = metadata[tag][0]
|
||||
let value = metadata[tag][0]
|
||||
|
||||
/*
|
||||
EXAMPLES:
|
||||
|
||||
"dc:title": [
|
||||
{
|
||||
"_": "The Quest for Character",
|
||||
"$": {
|
||||
"opf:file-as": "Quest for Character What the Story of Socrates and Alcibiades"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
OR
|
||||
|
||||
"dc:title": [
|
||||
"The Quest for Character"
|
||||
]
|
||||
*/
|
||||
if (typeof value === 'object') value = value._
|
||||
if (typeof value !== 'string') return null
|
||||
return value
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user