fix: make SeriesMetadata language tag lowercase

closes #661
This commit is contained in:
Gauthier Roebroeck 2021-09-06 16:38:06 +08:00
parent 8ff6c8620e
commit fe2b756c2f
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,2 @@
update SERIES_METADATA
set language = lower(language);

View file

@ -10,7 +10,7 @@ class SeriesMetadata(
val readingDirection: ReadingDirection? = null,
publisher: String = "",
val ageRating: Int? = null,
val language: String = "",
language: String = "",
genres: Set<String> = emptySet(),
tags: Set<String> = emptySet(),
val totalBookCount: Int? = null,
@ -36,6 +36,7 @@ class SeriesMetadata(
val titleSort = titleSort.trim()
val summary = summary.trim()
val publisher = publisher.trim()
val language = language.trim().lowercase()
val tags = tags.map { it.lowercase().trim() }.filter { it.isNotBlank() }.toSet()
val genres = genres.map { it.lowercase().trim() }.filter { it.isNotBlank() }.toSet()