mirror of
https://github.com/gotson/komga.git
synced 2025-12-21 07:56:57 +01:00
fix(epub): parse multiple dc:subjects for series genre
This commit is contained in:
parent
a6c19f6eee
commit
c25b9cf5f9
1 changed files with 4 additions and 2 deletions
|
|
@ -95,7 +95,9 @@ class EpubMetadataProvider(
|
|||
)?.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 }
|
||||
val genres = opf.select("metadata > dc|subject")
|
||||
?.mapNotNull { it.text() }
|
||||
?.toSet()
|
||||
|
||||
val direction = opf.getElementsByTag("spine").first().attr("page-progression-direction")?.let {
|
||||
when (it) {
|
||||
|
|
@ -114,7 +116,7 @@ class EpubMetadataProvider(
|
|||
ageRating = null,
|
||||
summary = null,
|
||||
language = if (language != null && BCP47TagValidator.isValid(language)) language else null,
|
||||
genres = genre?.let { setOf(genre) },
|
||||
genres = genres,
|
||||
collections = emptyList()
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue