From 4c68d5f8d334c26cdc0af2099fc79934df5e0d61 Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Thu, 25 Jul 2024 04:54:23 -0500 Subject: [PATCH] HeanCMS: Replace mangaDetails endpoint and enable login in TempleScan (#4226) * fix mangadetails * temple now has paid chapters --- lib-multisrc/heancms/build.gradle.kts | 2 +- .../src/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt | 4 ++-- .../eu/kanade/tachiyomi/extension/en/templescan/TempleScan.kt | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib-multisrc/heancms/build.gradle.kts b/lib-multisrc/heancms/build.gradle.kts index 718a56b7b..32122901d 100644 --- a/lib-multisrc/heancms/build.gradle.kts +++ b/lib-multisrc/heancms/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("lib-multisrc") } -baseVersionCode = 24 +baseVersionCode = 25 dependencies { api(project(":lib:i18n")) diff --git a/lib-multisrc/heancms/src/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt b/lib-multisrc/heancms/src/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt index 032cf9fbc..6909288cd 100644 --- a/lib-multisrc/heancms/src/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt +++ b/lib-multisrc/heancms/src/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt @@ -225,13 +225,13 @@ abstract class HeanCms( throw Exception(intl.format("url_changed_error", name, name)) } - val seriesId = manga.url.substringAfterLast("#") + val seriesSlug = manga.url.substringAfterLast("/").substringBefore("#") val apiHeaders = headersBuilder() .add("Accept", ACCEPT_JSON) .build() - return GET("$apiUrl/series/id/$seriesId", apiHeaders) + return GET("$apiUrl/series/$seriesSlug", apiHeaders) } override fun mangaDetailsParse(response: Response): SManga { diff --git a/src/en/templescan/src/eu/kanade/tachiyomi/extension/en/templescan/TempleScan.kt b/src/en/templescan/src/eu/kanade/tachiyomi/extension/en/templescan/TempleScan.kt index 96e2cb6f2..4e8e5ef9f 100644 --- a/src/en/templescan/src/eu/kanade/tachiyomi/extension/en/templescan/TempleScan.kt +++ b/src/en/templescan/src/eu/kanade/tachiyomi/extension/en/templescan/TempleScan.kt @@ -17,4 +17,6 @@ class TempleScan : HeanCms( .build() override val mangaSubDirectory = "comic" + + override val enableLogin = true }