Fix chapter images not loading at Tsuki (#5206)

* Fix chapter images not loading at Tsuki.

* Add explicit .string.
This commit is contained in:
Alessandro Jean 2020-12-19 20:06:28 -03:00 committed by GitHub
parent 6b74d867b1
commit eaab0e1ce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Tsuki Mangás' extName = 'Tsuki Mangás'
pkgNameSuffix = 'pt.tsukimangas' pkgNameSuffix = 'pt.tsukimangas'
extClass = '.TsukiMangas' extClass = '.TsukiMangas'
extVersionCode = 7 extVersionCode = 8
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -251,7 +251,10 @@ class TsukiMangas : HttpSource() {
override fun pageListParse(response: Response): List<Page> { override fun pageListParse(response: Response): List<Page> {
val result = response.asJson().array 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<String> = Observable.just(page.imageUrl!!) override fun fetchImageUrl(page: Page): Observable<String> = Observable.just(page.imageUrl!!)