diff --git a/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComics.kt b/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComics.kt index 49db156b2..e62b66208 100644 --- a/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComics.kt +++ b/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComics.kt @@ -199,6 +199,11 @@ class FlameComics : HttpSource() { }.build().toString() + "&w=640&q=75", ) description = seriesData.description + + genre = seriesData.tags?.let { tags -> + (listOf(seriesData.type) + tags).joinToString() + } ?: seriesData.type + author = seriesData.author status = when (seriesData.status.lowercase()) { "ongoing" -> SManga.ONGOING diff --git a/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComicsDto.kt b/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComicsDto.kt index 508c74f42..e069a8a0b 100644 --- a/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComicsDto.kt +++ b/src/en/flamecomics/src/eu/kanade/tachiyomi/extension/en/flamecomics/FlameComicsDto.kt @@ -2,11 +2,14 @@ package eu.kanade.tachiyomi.extension.en.flamecomics import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable +import kotlinx.serialization.builtins.ListSerializer import kotlinx.serialization.builtins.MapSerializer import kotlinx.serialization.builtins.serializer +import kotlinx.serialization.decodeFromString import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder +import kotlinx.serialization.json.Json @Serializable class NewBuildID( @@ -70,6 +73,9 @@ class Series( val altTitles: String?, val description: String, val cover: String, + val type: String, + @Serializable(with = TagsListSerializer::class) + val tags: List?, val author: String?, val status: String, val series_id: Int, @@ -101,3 +107,14 @@ class KeysToListSerializer : KSerializer> { override fun serialize(encoder: Encoder, value: List) {} } + +class TagsListSerializer : KSerializer> { + private val listSer = ListSerializer(String.serializer()) + override val descriptor: SerialDescriptor = listSer.descriptor + override fun deserialize(decoder: Decoder): List { + val jsonString = decoder.decodeString() + return Json.decodeFromString(jsonString) + } + + override fun serialize(encoder: Encoder, value: List) {} +}