From a4e879bba9607032caa8c0ff16c58c37df6eb209 Mon Sep 17 00:00:00 2001 From: Vetle Ledaal Date: Mon, 20 May 2024 11:14:05 +0000 Subject: [PATCH] Manga District: fix thumbnail (#3137) * Manga District: fix thumbnail * use absolute URL always --- src/en/mangadistrict/build.gradle | 2 +- .../tachiyomi/extension/en/mangadistrict/MangaDistrict.kt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/en/mangadistrict/build.gradle b/src/en/mangadistrict/build.gradle index 95e09fcb2..81a664004 100644 --- a/src/en/mangadistrict/build.gradle +++ b/src/en/mangadistrict/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.MangaDistrict' themePkg = 'madara' baseUrl = 'https://mangadistrict.com' - overrideVersionCode = 4 + overrideVersionCode = 5 isNsfw = true } diff --git a/src/en/mangadistrict/src/eu/kanade/tachiyomi/extension/en/mangadistrict/MangaDistrict.kt b/src/en/mangadistrict/src/eu/kanade/tachiyomi/extension/en/mangadistrict/MangaDistrict.kt index 3610d3ad4..8cddd2a4a 100644 --- a/src/en/mangadistrict/src/eu/kanade/tachiyomi/extension/en/mangadistrict/MangaDistrict.kt +++ b/src/en/mangadistrict/src/eu/kanade/tachiyomi/extension/en/mangadistrict/MangaDistrict.kt @@ -90,6 +90,13 @@ class MangaDistrict : }.let(screen::addPreference) } + override fun imageFromElement(element: Element): String? { + return when { + element.hasAttr("data-wpfc-original-src") -> element.attr("abs:data-wpfc-original-src") + else -> super.imageFromElement(element) + } + } + companion object { private const val REMOVE_TITLE_VERSION_PREF = "REMOVE_TITLE_VERSION"