HeanCMS: Replace mangaDetails endpoint and enable login in TempleScan (#4226)

* fix mangadetails

* temple now has paid chapters
This commit is contained in:
bapeey 2024-07-25 04:54:23 -05:00 committed by Draff
parent c12d0d302f
commit 4c68d5f8d3
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
3 changed files with 5 additions and 3 deletions

View File

@ -2,7 +2,7 @@ plugins {
id("lib-multisrc") id("lib-multisrc")
} }
baseVersionCode = 24 baseVersionCode = 25
dependencies { dependencies {
api(project(":lib:i18n")) api(project(":lib:i18n"))

View File

@ -225,13 +225,13 @@ abstract class HeanCms(
throw Exception(intl.format("url_changed_error", name, name)) throw Exception(intl.format("url_changed_error", name, name))
} }
val seriesId = manga.url.substringAfterLast("#") val seriesSlug = manga.url.substringAfterLast("/").substringBefore("#")
val apiHeaders = headersBuilder() val apiHeaders = headersBuilder()
.add("Accept", ACCEPT_JSON) .add("Accept", ACCEPT_JSON)
.build() .build()
return GET("$apiUrl/series/id/$seriesId", apiHeaders) return GET("$apiUrl/series/$seriesSlug", apiHeaders)
} }
override fun mangaDetailsParse(response: Response): SManga { override fun mangaDetailsParse(response: Response): SManga {

View File

@ -17,4 +17,6 @@ class TempleScan : HeanCms(
.build() .build()
override val mangaSubDirectory = "comic" override val mangaSubDirectory = "comic"
override val enableLogin = true
} }