fix mangadex titles having "" (#8037)
This commit is contained in:
parent
b3aaf136c2
commit
1cc39ff6e0
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'MangaDex'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 122
|
extVersionCode = 123
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package eu.kanade.tachiyomi.extension.all.mangadex.dto
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonElement
|
import kotlinx.serialization.json.JsonElement
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
|
import kotlinx.serialization.json.contentOrNull
|
||||||
|
import kotlinx.serialization.json.jsonPrimitive
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class MangaListDto(
|
data class MangaListDto(
|
||||||
|
@ -59,6 +61,6 @@ data class TagDto(
|
||||||
|
|
||||||
fun JsonElement.asMdMap(): Map<String, String> {
|
fun JsonElement.asMdMap(): Map<String, String> {
|
||||||
return runCatching {
|
return runCatching {
|
||||||
(this as JsonObject).map { it.key to it.value.toString() }.toMap()
|
(this as JsonObject).map { it.key to (it.value.jsonPrimitive.contentOrNull ?: "") }.toMap()
|
||||||
}.getOrElse { emptyMap() }
|
}.getOrElse { emptyMap() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue