diff --git a/src/all/madara/build.gradle b/src/all/madara/build.gradle index 80e59f045..efdd6cfa0 100644 --- a/src/all/madara/build.gradle +++ b/src/all/madara/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: Madara (multiple sources)' pkgNameSuffix = "all.madara" extClass = '.MadaraFactory' - extVersionCode = 64 + extVersionCode = 65 libVersion = '1.2' } diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt index d5dc5de08..bbbcf5127 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt @@ -335,7 +335,7 @@ abstract class Madara( } } select("div.summary_image img").first()?.let { - manga.thumbnail_url = it.absUrl(if (it.hasAttr("data-src")) "data-src" else "src") + manga.thumbnail_url = detailsThumbnail(it) } select("div.summary-content").last()?.let { manga.status = when (it.text()) { @@ -357,6 +357,10 @@ abstract class Madara( return manga } + open fun detailsThumbnail(element: Element): String { + return element.absUrl(if (element.hasAttr("data-src")) "data-src" else "src") + } + override fun chapterListSelector() = "li.wp-manga-chapter" override fun chapterFromElement(element: Element): SChapter { diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt index de8dc9210..f758a376f 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt @@ -160,6 +160,9 @@ class MangazukiClubKO : Madara("Mangazuki.club", "https://mangazuki.club", "ko") class FirstKissManga : Madara("1st Kiss", "https://1stkissmanga.com", "en", dateFormat = SimpleDateFormat("dd MMM yyyy", Locale.US)) { override fun headersBuilder(): Headers.Builder = super.headersBuilder().add("Referer", baseUrl) + override fun detailsThumbnail(element: Element): String { + return if (element.hasAttr("data-lazy-src")) element.attr("abs:data-lazy-src") else super.detailsThumbnail(element) + } } class MangaSY : Madara("Manga SY", "https://www.mangasy.com", "en")