mirror of
https://github.com/gotson/komga.git
synced 2025-12-22 00:13:30 +01:00
fix: series genre is not imported from metadata
This commit is contained in:
parent
f4451bfd41
commit
d0815dd80e
4 changed files with 5 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ data class SeriesMetadataPatch(
|
|||
val publisher: String?,
|
||||
val ageRating: Int?,
|
||||
val language: String?,
|
||||
val genres: Set<String>,
|
||||
val genres: Set<String>?,
|
||||
|
||||
val collections: List<String>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class MetadataLifecycle(
|
|||
title = patches.mostFrequent { it.title },
|
||||
titleSort = patches.mostFrequent { it.titleSort },
|
||||
status = patches.mostFrequent { it.status },
|
||||
genres = patches.flatMap { it.genres }.toSet(),
|
||||
genres = patches.mapNotNull { it.genres }.flatten().toSet(),
|
||||
language = patches.mostFrequent { it.language },
|
||||
summary = null,
|
||||
readingDirection = patches.mostFrequent { it.readingDirection },
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class ComicInfoProvider(
|
|||
else -> null
|
||||
}
|
||||
|
||||
val genres = comicInfo.genre?.split(',')?.map { it.trim() }?.toSet() ?: emptySet()
|
||||
val genres = comicInfo.genre?.split(',')?.map { it.trim() }?.toSet()
|
||||
|
||||
return SeriesMetadataPatch(
|
||||
title = comicInfo.series,
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ class EpubMetadataProvider(
|
|||
publisher = publisher,
|
||||
ageRating = null,
|
||||
summary = null,
|
||||
language = if(language != null && BCP47TagValidator.isValid(language)) language else null,
|
||||
genres = if(genre != null) setOf(genre) else emptySet(),
|
||||
language = if (language != null && BCP47TagValidator.isValid(language)) language else null,
|
||||
genres = genre?.let { setOf(genre) },
|
||||
collections = emptyList()
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue