From 61383e923ab68fb3448ba3c945c2875eaadf59fa Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Wed, 16 Aug 2023 23:54:56 +0500 Subject: [PATCH] 1st Kiss: fix image attr (#17538) 1stKiss: fix image attr --- .../madara/firstkissmanga/src/FirstKissManga.kt | 16 ++++++++++++++++ .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/multisrc/overrides/madara/firstkissmanga/src/FirstKissManga.kt b/multisrc/overrides/madara/firstkissmanga/src/FirstKissManga.kt index c170b72bc..dcda476b7 100644 --- a/multisrc/overrides/madara/firstkissmanga/src/FirstKissManga.kt +++ b/multisrc/overrides/madara/firstkissmanga/src/FirstKissManga.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.en.firstkissmanga import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.network.interceptor.rateLimit +import org.jsoup.nodes.Element import java.util.concurrent.TimeUnit class FirstKissManga : Madara( @@ -12,4 +13,19 @@ class FirstKissManga : Madara( override val client = super.client.newBuilder() .rateLimit(1, 3, TimeUnit.SECONDS) .build() + + override fun searchPage(page: Int): String { + return if (page > 1) { + "page/$page/" + } else { + "" + } + } + + override fun imageFromElement(element: Element): String? { + return when { + element.hasAttr("data-cfsrc") -> element.attr("abs:data-cfsrc") + else -> super.imageFromElement(element) + }?.trim() + } } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index c33d016c5..d9c6ad149 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -18,7 +18,7 @@ class MadaraGenerator : ThemeSourceGenerator { MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1), MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 4), MultiLang("Reaper Scans", "https://reaperscans.com", listOf("fr", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 12), - SingleLang("1st Kiss", "https://1stkissmanga.me", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 9), + SingleLang("1st Kiss", "https://1stkissmanga.me", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 10), SingleLang("1stKissManga.Club", "https://1stkissmanga.club", "en", className = "FirstKissMangaClub", overrideVersionCode = 2), SingleLang("247Manga", "https://247manga.com", "en", className = "Manga247", overrideVersionCode = 1), SingleLang("365Manga", "https://365manga.com", "en", className = "ThreeSixtyFiveManga", overrideVersionCode = 1),