mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-30 22:59:37 +02:00
Get series info from opf
This commit is contained in:
parent
9423727f89
commit
6e621ecce1
2 changed files with 19 additions and 1 deletions
|
@ -56,6 +56,12 @@ const xmlToJSON = (xml) => {
|
|||
Logger.error(`[xmlToJSON] Error`, err)
|
||||
resolve(null)
|
||||
} else {
|
||||
if (typeof results.package.metadata[0].meta != "undefined") {
|
||||
results.package.metadata[0].meta = {}
|
||||
for(var match of xml.matchAll(/<meta name="(?<name>.+)" content="(?<content>.+)"\/>/g)) {
|
||||
results.package.metadata[0].meta[match.groups['name']] = [match.groups['content']]
|
||||
}
|
||||
}
|
||||
resolve(results)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue