mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 10:22:47 +01:00
parent
21ee662448
commit
6e330faa35
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Loading Artist'
|
||||
extClass = '.LoadingArtist'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -10,9 +10,8 @@ import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.decodeFromJsonElement
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import rx.Observable
|
||||
@ -89,9 +88,7 @@ class LoadingArtist : HttpSource() {
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val comics = json.parseToJsonElement(response.body.string()).jsonObject.map {
|
||||
json.decodeFromJsonElement<Comic>(it.value)
|
||||
}
|
||||
val comics = json.decodeFromString<List<Comic>>(response.body.string())
|
||||
val validTypes = listOf("comic", "game", "art")
|
||||
return comics.filter { validTypes.any { type -> it.section == type } }.map {
|
||||
SChapter.create().apply {
|
||||
|
Loading…
Reference in New Issue
Block a user