From eaab0e1ce93ffb736cc0528f25f258c8662a4778 Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Sat, 19 Dec 2020 20:06:28 -0300 Subject: [PATCH] Fix chapter images not loading at Tsuki (#5206) * Fix chapter images not loading at Tsuki. * Add explicit .string. --- src/pt/tsukimangas/build.gradle | 2 +- .../kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pt/tsukimangas/build.gradle b/src/pt/tsukimangas/build.gradle index 36074bb05..dd939a7b3 100644 --- a/src/pt/tsukimangas/build.gradle +++ b/src/pt/tsukimangas/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Tsuki Mangás' pkgNameSuffix = 'pt.tsukimangas' extClass = '.TsukiMangas' - extVersionCode = 7 + extVersionCode = 8 libVersion = '1.2' } diff --git a/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt b/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt index bbbf69111..5fb0c160b 100644 --- a/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt +++ b/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt @@ -251,7 +251,10 @@ class TsukiMangas : HttpSource() { override fun pageListParse(response: Response): List { val result = response.asJson().array - return result.mapIndexed { i, page -> Page(i, baseUrl + "/", page.obj["IMG"].string) } + return result.mapIndexed { i, page -> + val cdnUrl = "https://cdn${page.obj["SERVIDOR"].string}.tsukimangas.com" + Page(i, "$baseUrl/", cdnUrl + page.obj["IMG"].string) + } } override fun fetchImageUrl(page: Page): Observable = Observable.just(page.imageUrl!!)