fix: retrieve series from epub correctly

it would not work with namespaced elements generated by Calibre

part of #556
This commit is contained in:
Gauthier Roebroeck 2021-06-22 14:20:10 +08:00
parent 52d81ef1d7
commit fbd8655c51

View File

@ -85,7 +85,7 @@ class EpubMetadataProvider(
epubExtractor.getPackageFile(book.book.path)?.let { packageFile ->
val opf = Jsoup.parse(packageFile)
val series = opf.selectFirst("metadata > meta[property=belongs-to-collection]")?.text()?.ifBlank { null }
val series = opf.selectFirst("metadata > *|meta[property=belongs-to-collection]")?.text()?.ifBlank { null }
val publisher = opf.selectFirst("metadata > dc|publisher")?.text()?.ifBlank { null }
val language = opf.selectFirst("metadata > dc|language")?.text()?.ifBlank { null }
val genre = opf.selectFirst("metadata > dc|subject")?.text()?.ifBlank { null }