From 9854eb2af2d89e821fa839d161e1e49706f36781 Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Fri, 30 Jul 2021 07:26:11 -0300 Subject: [PATCH] Fix chapter images not loading at some WPMangaStream sources. (#8309) --- .../kanade/tachiyomi/multisrc/wpmangastream/WPMangaStream.kt | 3 ++- .../tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStream.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStream.kt index 18922fb23..3cabff18a 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStream.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStream.kt @@ -286,7 +286,8 @@ abstract class WPMangaStream( val imageList = json.parseToJsonElement(imageListJson).jsonArray val scriptPages = imageList.mapIndexed { i, jsonEl -> - Page(i, "", jsonEl.jsonPrimitive.content) + val imageUrl = jsonEl.jsonPrimitive.content + Page(i, "", if (imageUrl.startsWith(baseUrl)) imageUrl else baseUrl + imageUrl) } if (htmlPages.size < scriptPages.size) { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt index 556d49c96..9c9004f2d 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt @@ -9,7 +9,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator { override val themeClass = "WPMangaStream" - override val baseVersionCode: Int = 7 + override val baseVersionCode: Int = 8 override val sources = listOf( SingleLang("Asura Scans", "https://www.asurascans.com", "en", overrideVersionCode = 5),