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:
Luqman 2025-10-03 18:17:18 +07:00 committed by Draff
parent 7071d503a7
commit 1b0b8e103f
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 29 additions and 6 deletions

View File

@ -1,9 +1,9 @@
ext {
extName = 'Ken Scans'
extClass = '.KenScans'
themePkg = 'keyoapp'
themePkg = 'iken'
baseUrl = 'https://kenscans.com'
overrideVersionCode = 0
overrideVersionCode = 8
isNsfw = false
}

View File

@ -1,9 +1,32 @@
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",
"https://kenscans.com",
"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)
}
}