Ken Scans: fix browse, site changing theme (#10851)
* Ken Scans: fix browse, site changing theme * Update src/en/kenscans/src/eu/kanade/tachiyomi/extension/en/kenscans/KenScans.kt Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com> * Update src/en/kenscans/src/eu/kanade/tachiyomi/extension/en/kenscans/KenScans.kt Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com> * cleaning import --------- Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
This commit is contained in:
parent
7071d503a7
commit
1b0b8e103f
@ -1,9 +1,9 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Ken Scans'
|
extName = 'Ken Scans'
|
||||||
extClass = '.KenScans'
|
extClass = '.KenScans'
|
||||||
themePkg = 'keyoapp'
|
themePkg = 'iken'
|
||||||
baseUrl = 'https://kenscans.com'
|
baseUrl = 'https://kenscans.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 8
|
||||||
isNsfw = false
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,32 @@
|
|||||||
package eu.kanade.tachiyomi.extension.en.kenscans
|
package eu.kanade.tachiyomi.extension.en.kenscans
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
import eu.kanade.tachiyomi.multisrc.iken.Iken
|
||||||
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import okhttp3.Request
|
||||||
|
import okhttp3.Response
|
||||||
|
|
||||||
class KenScans : Keyoapp(
|
class KenScans : Iken(
|
||||||
"Ken Scans",
|
"Ken Scans",
|
||||||
"https://kenscans.com",
|
|
||||||
"en",
|
"en",
|
||||||
)
|
"https://kenscans.com",
|
||||||
|
"https://api.kenscans.com",
|
||||||
|
) {
|
||||||
|
override fun chapterListRequest(manga: SManga): Request {
|
||||||
|
// Migration from old web theme to the new one(Keyoapp -> Iken)
|
||||||
|
if (manga.url.startsWith("/series/")) {
|
||||||
|
throw Exception("Migrate from $name to $name (same extension)")
|
||||||
|
}
|
||||||
|
return super.chapterListRequest(manga)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
|
// Migration from old web theme to the new one(Keyoapp -> Iken)
|
||||||
|
val url = response.request.url.toString().substringAfter(baseUrl)
|
||||||
|
if (url.startsWith("/chapter/")) {
|
||||||
|
throw Exception("Migrate from $name to $name (same extension)")
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.pageListParse(response)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user