Manga District: fix thumbnail (#3137)

* Manga District: fix thumbnail

* use absolute URL always
This commit is contained in:
Vetle Ledaal 2024-05-20 11:14:05 +00:00 committed by Draff
parent 6d3f09e1df
commit a4e879bba9
2 changed files with 8 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.MangaDistrict' extClass = '.MangaDistrict'
themePkg = 'madara' themePkg = 'madara'
baseUrl = 'https://mangadistrict.com' baseUrl = 'https://mangadistrict.com'
overrideVersionCode = 4 overrideVersionCode = 5
isNsfw = true isNsfw = true
} }

View File

@ -90,6 +90,13 @@ class MangaDistrict :
}.let(screen::addPreference) }.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 { companion object {
private const val REMOVE_TITLE_VERSION_PREF = "REMOVE_TITLE_VERSION" private const val REMOVE_TITLE_VERSION_PREF = "REMOVE_TITLE_VERSION"