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 {
|
ext {
|
||||||
extName = 'Loading Artist'
|
extName = 'Loading Artist'
|
||||||
extClass = '.LoadingArtist'
|
extClass = '.LoadingArtist'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
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.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.decodeFromString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.decodeFromJsonElement
|
|
||||||
import kotlinx.serialization.json.jsonObject
|
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
@ -89,9 +88,7 @@ class LoadingArtist : HttpSource() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
val comics = json.parseToJsonElement(response.body.string()).jsonObject.map {
|
val comics = json.decodeFromString<List<Comic>>(response.body.string())
|
||||||
json.decodeFromJsonElement<Comic>(it.value)
|
|
||||||
}
|
|
||||||
val validTypes = listOf("comic", "game", "art")
|
val validTypes = listOf("comic", "game", "art")
|
||||||
return comics.filter { validTypes.any { type -> it.section == type } }.map {
|
return comics.filter { validTypes.any { type -> it.section == type } }.map {
|
||||||
SChapter.create().apply {
|
SChapter.create().apply {
|
||||||
|
Loading…
Reference in New Issue
Block a user