From 488adf9ba6937654ff6afc5183decae73f1f5530 Mon Sep 17 00:00:00 2001 From: anenasa <84259093+anenasa@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:48:00 +0800 Subject: [PATCH] Dm5: Fix image not loading (#1795) --- src/zh/dm5/build.gradle | 2 +- src/zh/dm5/src/eu/kanade/tachiyomi/extension/zh/dm5/Dm5.kt | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/zh/dm5/build.gradle b/src/zh/dm5/build.gradle index 2186c57a2..a100953c6 100644 --- a/src/zh/dm5/build.gradle +++ b/src/zh/dm5/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Dm5' extClass = '.Dm5' - extVersionCode = 1 + extVersionCode = 2 isNsfw = true } diff --git a/src/zh/dm5/src/eu/kanade/tachiyomi/extension/zh/dm5/Dm5.kt b/src/zh/dm5/src/eu/kanade/tachiyomi/extension/zh/dm5/Dm5.kt index bb24d775d..fad5e77ca 100644 --- a/src/zh/dm5/src/eu/kanade/tachiyomi/extension/zh/dm5/Dm5.kt +++ b/src/zh/dm5/src/eu/kanade/tachiyomi/extension/zh/dm5/Dm5.kt @@ -185,12 +185,7 @@ class Dm5 : ParsedHttpSource(), ConfigurableSource { override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException() override fun imageRequest(page: Page): Request { - if (!page.imageUrl!!.contains("pagerdata.ashx")) { - return GET(page.imageUrl!!, headers) - } - - val referer = page.imageUrl!!.substringBefore("pagerdata.ashx") - val header = headers.newBuilder().add("Referer", referer).build() + val header = headers.newBuilder().add("Referer", baseUrl).build() return GET(page.imageUrl!!, header) }