diff --git a/src/pt/randomscan/build.gradle b/src/pt/randomscan/build.gradle index 2f3d2b386..fffe45527 100644 --- a/src/pt/randomscan/build.gradle +++ b/src/pt/randomscan/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.LuraToon' themePkg = 'peachscan' baseUrl = 'https://luratoons.com' - overrideVersionCode = 43 + overrideVersionCode = 44 } apply from: "$rootDir/common.gradle" diff --git a/src/pt/randomscan/src/eu/kanade/tachiyomi/extension/pt/randomscan/LuraToon.kt b/src/pt/randomscan/src/eu/kanade/tachiyomi/extension/pt/randomscan/LuraToon.kt index 7510af48e..686bbea44 100644 --- a/src/pt/randomscan/src/eu/kanade/tachiyomi/extension/pt/randomscan/LuraToon.kt +++ b/src/pt/randomscan/src/eu/kanade/tachiyomi/extension/pt/randomscan/LuraToon.kt @@ -10,6 +10,8 @@ import eu.kanade.tachiyomi.lib.randomua.setRandomUserAgent import eu.kanade.tachiyomi.multisrc.peachscan.PeachScan import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.source.ConfigurableSource +import eu.kanade.tachiyomi.source.model.SChapter +import org.jsoup.nodes.Element import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get @@ -36,4 +38,16 @@ class LuraToon : override fun setupPreferenceScreen(screen: PreferenceScreen) { addRandomUAPreferenceToScreen(screen) } + + override fun chapterFromElement(element: Element): SChapter { + val mangaUrl = element.ownerDocument()!!.location() + + return super.chapterFromElement(element).apply { + val num = url.removeSuffix("/") + .substringAfterLast("/") + val chapUrl = mangaUrl.removeSuffix("/") + "/$num/" + + setUrlWithoutDomain(chapUrl) + } + } }