diff --git a/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt b/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt index 2d963c9cf..c8f28f285 100644 --- a/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt +++ b/multisrc/overrides/madara/lectormangalat/src/LectorMangaLat.kt @@ -6,7 +6,6 @@ import eu.kanade.tachiyomi.network.interceptor.rateLimit import okhttp3.FormBody import okhttp3.OkHttpClient import okhttp3.Request -import org.jsoup.nodes.Element import java.text.SimpleDateFormat import java.util.Locale import java.util.concurrent.TimeUnit @@ -62,14 +61,4 @@ class LectorMangaLat : Madara( } override val pageListParseSelector = "div.reading-content div.page-break > img" - - override fun imageFromElement(element: Element): String? { - return when { - element.hasAttr("data-cfsrc") -> element.attr("abs:data-cfsrc") - element.hasAttr("data-src") -> element.attr("abs:data-src") - element.hasAttr("data-lazy-src") -> element.attr("abs:data-lazy-src") - element.hasAttr("srcset") -> element.attr("abs:srcset").substringBefore(" ") - else -> element.attr("abs:src") - } - } } diff --git a/multisrc/overrides/madara/mangareadorg/src/MangaReadOrg.kt b/multisrc/overrides/madara/mangareadorg/src/MangaReadOrg.kt index 2f9121aa3..2c3323fe2 100644 --- a/multisrc/overrides/madara/mangareadorg/src/MangaReadOrg.kt +++ b/multisrc/overrides/madara/mangareadorg/src/MangaReadOrg.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.extension.en.mangareadorg import eu.kanade.tachiyomi.multisrc.madara.Madara -import org.jsoup.nodes.Element import java.text.SimpleDateFormat import java.util.Locale @@ -10,14 +9,4 @@ class MangaReadOrg : Madara( "https://www.mangaread.org", "en", SimpleDateFormat("dd.MM.yyy", Locale.US), -) { - override fun imageFromElement(element: Element): String? { - return when { - element.hasAttr("data-cfsrc") -> element.attr("abs:data-cfsrc") - element.hasAttr("data-src") -> element.attr("abs:data-src") - element.hasAttr("data-lazy-src") -> element.attr("abs:data-lazy-src") - element.hasAttr("srcset") -> element.attr("abs:srcset").substringBefore(" ") - else -> element.attr("abs:src") - } - } -} +) diff --git a/multisrc/overrides/mangathemesia/asurascans/src/AsuraScans.kt b/multisrc/overrides/mangathemesia/asurascans/src/AsuraScans.kt index 63f2f0559..bda060f91 100644 --- a/multisrc/overrides/mangathemesia/asurascans/src/AsuraScans.kt +++ b/multisrc/overrides/mangathemesia/asurascans/src/AsuraScans.kt @@ -18,7 +18,6 @@ import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Document -import org.jsoup.nodes.Element import rx.Observable import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get @@ -115,13 +114,6 @@ class AsuraScans : MangaThemesia( .mapIndexed { i, img -> Page(i, document.location(), img.attr("abs:src")) } } - override fun Element.imgAttr(): String = when { - hasAttr("data-lazy-src") -> attr("abs:data-lazy-src") - hasAttr("data-src") -> attr("abs:data-src") - hasAttr("data-cfsrc") -> attr("abs:data-cfsrc") - else -> attr("abs:src") - } - private fun Observable.tempUrlToPermIfNeeded(): Observable { return this.map { mangasPage -> MangasPage( diff --git a/multisrc/overrides/mangathemesia/carteldemanhwas/src/CarteldeManhwas.kt b/multisrc/overrides/mangathemesia/carteldemanhwas/src/CarteldeManhwas.kt index f2f56e372..d7291369d 100644 --- a/multisrc/overrides/mangathemesia/carteldemanhwas/src/CarteldeManhwas.kt +++ b/multisrc/overrides/mangathemesia/carteldemanhwas/src/CarteldeManhwas.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.extension.es.carteldemanhwas import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia -import org.jsoup.nodes.Element import java.text.SimpleDateFormat import java.util.Locale @@ -15,13 +14,6 @@ class CarteldeManhwas : MangaThemesia( override val hasProjectPage = true override val projectPageString = "/proyectos" - override fun Element.imgAttr(): String = when { - hasAttr("data-lazy-src") -> attr("abs:data-lazy-src") - hasAttr("data-cfsrc") -> attr("abs:data-cfsrc") - hasAttr("data-src") -> attr("abs:data-src") - else -> attr("abs:src") - } - override fun searchMangaSelector() = ".utao .uta .imgu:not(:has(span.novelabel)), " + ".listupd .bs .bsx:not(:has(span.novelabel)), " + ".listo .bs .bsx:not(:has(span.novelabel))" diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt index e02cff685..d5c7f99ba 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt @@ -619,6 +619,7 @@ abstract class Madara( element.hasAttr("data-src") -> element.attr("abs:data-src") element.hasAttr("data-lazy-src") -> element.attr("abs:data-lazy-src") element.hasAttr("srcset") -> element.attr("abs:srcset").substringBefore(" ") + element.hasAttr("data-cfsrc") -> element.attr("abs:data-cfsrc") else -> element.attr("abs:src") } } 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 e90dfe439..35f32f311 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 @@ -10,7 +10,7 @@ class MadaraGenerator : ThemeSourceGenerator { override val themeClass = "Madara" - override val baseVersionCode: Int = 32 + override val baseVersionCode: Int = 33 override val sources = listOf( MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1), diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt index 788030d69..63a883321 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesia.kt @@ -497,6 +497,7 @@ abstract class MangaThemesia( protected open fun Element.imgAttr(): String = when { hasAttr("data-lazy-src") -> attr("abs:data-lazy-src") hasAttr("data-src") -> attr("abs:data-src") + hasAttr("data-cfsrc") -> attr("abs:data-cfsrc") else -> attr("abs:src") } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index 4869dca7c..6ac465a65 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -11,7 +11,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { override val themeClass = "MangaThemesia" - override val baseVersionCode: Int = 27 + override val baseVersionCode: Int = 28 override val sources = listOf( MultiLang("Miau Scan", "https://miaucomics.org", listOf("es", "pt-BR"), overrideVersionCode = 2),