SussyToons: Fix manga details (#8807)

Fix manga details
This commit is contained in:
Chopper 2025-05-10 17:55:55 -03:00 committed by Draff
parent 2905e17a9a
commit 913eddbbfc
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 10 additions and 3 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.SussyToons'
themePkg = 'greenshit'
baseUrl = 'https://www.sussytoons.wtf'
overrideVersionCode = 55
overrideVersionCode = 56
isNsfw = true
}

View File

@ -31,13 +31,20 @@ class SussyToons : GreenShit(
return MangasPage(mangas, hasNextPage = false)
}
override fun getChapterUrl(chapter: SChapter) = "$baseUrl${chapter.url}"
override fun getMangaUrl(manga: SManga) = "$baseUrl${manga.url}"
override fun chapterListRequest(manga: SManga): Request {
override fun mangaDetailsRequest(manga: SManga): Request {
val pathSegment = manga.url.substringBeforeLast("/").replace("obra", "obras")
return GET("$apiUrl$pathSegment", headers)
}
override fun mangaDetailsParse(response: Response) =
response.parseAs<ResultDto<MangaDto>>().results.toSManga()
override fun getChapterUrl(chapter: SChapter) = "$baseUrl${chapter.url}"
override fun chapterListRequest(manga: SManga) = mangaDetailsRequest(manga)
override fun chapterListParse(response: Response): List<SChapter> =
response.parseAs<ResultDto<WrapperChapterDto>>().toSChapterList()