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