From 97ce648e3467de394abcd0a86b96d7a7980638f6 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+choppeh@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:40:26 -0300 Subject: [PATCH 1/9] FenixManhwas: Fix chapters (#5656) Fix chapters --- src/pt/fenixmanhwas/build.gradle | 2 +- .../extension/pt/fenixmanhwas/FenixManhwas.kt | 27 +++++-------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/pt/fenixmanhwas/build.gradle b/src/pt/fenixmanhwas/build.gradle index b933b84d18..92ee4ac5a1 100644 --- a/src/pt/fenixmanhwas/build.gradle +++ b/src/pt/fenixmanhwas/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.FenixManhwas' themePkg = 'zeistmanga' baseUrl = 'https://fenixleitura.blogspot.com' - overrideVersionCode = 0 + overrideVersionCode = 1 } apply from: "$rootDir/common.gradle" diff --git a/src/pt/fenixmanhwas/src/eu/kanade/tachiyomi/extension/pt/fenixmanhwas/FenixManhwas.kt b/src/pt/fenixmanhwas/src/eu/kanade/tachiyomi/extension/pt/fenixmanhwas/FenixManhwas.kt index 62e0471b01..266ac8be7f 100644 --- a/src/pt/fenixmanhwas/src/eu/kanade/tachiyomi/extension/pt/fenixmanhwas/FenixManhwas.kt +++ b/src/pt/fenixmanhwas/src/eu/kanade/tachiyomi/extension/pt/fenixmanhwas/FenixManhwas.kt @@ -9,9 +9,9 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.util.asJsoup import kotlinx.serialization.decodeFromString -import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.Request import okhttp3.Response +import org.jsoup.nodes.Document class FenixManhwas : ZeistManga( "Fênix Manhwas", @@ -32,25 +32,12 @@ class FenixManhwas : ZeistManga( setUrlWithoutDomain(document.location()) } - override fun chapterListRequest(manga: SManga): Request { - val url = "$baseUrl/feeds/posts/default/-/".toHttpUrl().newBuilder() - .addPathSegment(manga.title) - .addQueryParameter("alt", "json") - .addQueryParameter("start-index", "1") - .addQueryParameter("max-results", "99999") - .addQueryParameter("orderby", "updated") - .build() - return GET(url, headers) - } - - override fun chapterListParse(response: Response): List { - val result = json.decodeFromString(response.body.string()) - return result.feed?.entry - ?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } } - ?.map { it.toSChapter(baseUrl) } - ?.sortedBy { it.name } - ?.reversed() - ?: throw Exception("Failed to parse from chapter API") + override fun getChapterFeedUrl(doc: Document): String { + val feed = doc.selectFirst(".chapter_get")!!.attr("data-labelchapter") + return apiUrl(chapterCategory) + .addPathSegments(feed) + .addQueryParameter("max-results", maxChapterResults.toString()) + .build().toString() } override fun pageListRequest(chapter: SChapter): Request { From 360a00e325617350a3286cb580c9e8a5ebbeb024 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+choppeh@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:40:55 -0300 Subject: [PATCH 2/9] TraducoesDoLipe: Refactoring (#5659) Refactoring --- .../pt/traducoesdolipe/TraducoesDoLipe.kt | 41 +++++-------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/src/pt/traducoesdolipe/src/eu/kanade/tachiyomi/extension/pt/traducoesdolipe/TraducoesDoLipe.kt b/src/pt/traducoesdolipe/src/eu/kanade/tachiyomi/extension/pt/traducoesdolipe/TraducoesDoLipe.kt index d2fb372755..e12afdd2b4 100644 --- a/src/pt/traducoesdolipe/src/eu/kanade/tachiyomi/extension/pt/traducoesdolipe/TraducoesDoLipe.kt +++ b/src/pt/traducoesdolipe/src/eu/kanade/tachiyomi/extension/pt/traducoesdolipe/TraducoesDoLipe.kt @@ -1,18 +1,13 @@ package eu.kanade.tachiyomi.extension.pt.traducoesdolipe import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga -import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaDto -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.asObservableSuccess import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.util.asJsoup import kotlinx.serialization.decodeFromString -import okhttp3.Request import okhttp3.Response +import org.jsoup.nodes.Document import org.jsoup.nodes.Element -import rx.Observable class TraducoesDoLipe : ZeistManga( "Traduções do Lipe", @@ -42,32 +37,16 @@ class TraducoesDoLipe : ZeistManga( setUrlWithoutDomain(document.location()) } - override fun chapterListRequest(manga: SManga): Request { - val projectName = manga.url.substringAfterLast("#") - val url = apiUrl(chapterCategory) - .addPathSegments(projectName) - .addQueryParameter("max-results", maxChapterResults.toString()) - .build() - return GET(url, headers) - } - - override fun fetchChapterList(manga: SManga): Observable> { - val project = client.newCall(mangaDetailsRequest(manga)).execute().let { - it.asJsoup().select("script").map(Element::html) - .firstOrNull { script -> script.contains("catNameProject") } - ?.let { script -> PROJECT_NAME_REGEX.find(script)?.groups?.get("project")?.value } - } + override fun getChapterFeedUrl(doc: Document): String { + val feed = doc.select("script").map(Element::html) + .firstOrNull { script -> script.contains("catNameProject") } + ?.let { script -> PROJECT_NAME_REGEX.find(script)?.groups?.get("project")?.value } + ?: throw Exception("Não foi possivel encontrar o nome do projeto") - return client.newCall(chapterListRequest(manga.apply { url = "$url#$project" })) - .asObservableSuccess() - .map(::chapterListParse) - } - - override fun chapterListParse(response: Response): List { - val result = json.decodeFromString(response.body.string()) - return result.feed?.entry?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } } - ?.map { it.toSChapter(baseUrl) } - ?: throw Exception("Failed to parse from chapter API") + return apiUrl(chapterCategory) + .addPathSegments(feed) + .addQueryParameter("max-results", maxChapterResults.toString()) + .build().toString() } override fun pageListParse(response: Response): List { From e56f0c031a49f196dbf8c433d5eccc596f7301d3 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+choppeh@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:41:19 -0300 Subject: [PATCH 3/9] KemonoTheme: Fix chapter URL in Webview (#5662) Fix chapter URL in Webview --- lib-multisrc/kemono/build.gradle.kts | 2 +- .../kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib-multisrc/kemono/build.gradle.kts b/lib-multisrc/kemono/build.gradle.kts index f5a077b4b4..bbea4c9922 100644 --- a/lib-multisrc/kemono/build.gradle.kts +++ b/lib-multisrc/kemono/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 13 +baseVersionCode = 14 diff --git a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt index cd5cba4360..fcc8b0577d 100644 --- a/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt +++ b/lib-multisrc/kemono/src/eu/kanade/tachiyomi/multisrc/kemono/Kemono.kt @@ -191,6 +191,8 @@ open class Kemono( override fun mangaDetailsParse(response: Response) = throw UnsupportedOperationException() + override fun getChapterUrl(chapter: SChapter) = "$baseUrl${chapter.url.replace("$apiPath/", "")}" + override fun fetchChapterList(manga: SManga): Observable> = Observable.fromCallable { KemonoPostDto.dateFormat.timeZone = when (manga.author) { "Pixiv Fanbox", "Fantia" -> TimeZone.getTimeZone("GMT+09:00") From 3fc6424252a138d937e2f4b29600467fef085334 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+choppeh@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:41:47 -0300 Subject: [PATCH 4/9] MangasOriginesFr: Fix dateFormat (#5663) Fix dateFormat --- src/fr/mangasoriginesfr/build.gradle | 2 +- .../extension/fr/mangasoriginesfr/MangasOriginesFr.kt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fr/mangasoriginesfr/build.gradle b/src/fr/mangasoriginesfr/build.gradle index 7c8bee96b0..df2d5a8c8c 100644 --- a/src/fr/mangasoriginesfr/build.gradle +++ b/src/fr/mangasoriginesfr/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.MangasOriginesFr' themePkg = 'madara' baseUrl = 'https://mangas-origines.fr' - overrideVersionCode = 0 + overrideVersionCode = 1 } apply from: "$rootDir/common.gradle" diff --git a/src/fr/mangasoriginesfr/src/eu/kanade/tachiyomi/extension/fr/mangasoriginesfr/MangasOriginesFr.kt b/src/fr/mangasoriginesfr/src/eu/kanade/tachiyomi/extension/fr/mangasoriginesfr/MangasOriginesFr.kt index 2af4ddc5dd..6f4796bb31 100644 --- a/src/fr/mangasoriginesfr/src/eu/kanade/tachiyomi/extension/fr/mangasoriginesfr/MangasOriginesFr.kt +++ b/src/fr/mangasoriginesfr/src/eu/kanade/tachiyomi/extension/fr/mangasoriginesfr/MangasOriginesFr.kt @@ -4,7 +4,12 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara import java.text.SimpleDateFormat import java.util.Locale -class MangasOriginesFr : Madara("Mangas-Origines.fr", "https://mangas-origines.fr", "fr", SimpleDateFormat("dd/mm/yyyy", Locale("fr"))) { +class MangasOriginesFr : Madara( + "Mangas-Origines.fr", + "https://mangas-origines.fr", + "fr", + SimpleDateFormat("dd/MM/yyyy", Locale("fr")), +) { override val mangaSubString = "catalogues" // Manga Details Selectors From f601b6cb75b5afdfdb7462bd942b9834e1b05a45 Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Thu, 24 Oct 2024 06:43:24 -0500 Subject: [PATCH 5/9] Keyoapp: Update cdn of sources and add paid chapters preference (#5666) * update cdn and move preference to theme * lint --- .../assets/i18n/messages_en.properties | 3 + lib-multisrc/keyoapp/build.gradle.kts | 6 +- .../tachiyomi/multisrc/keyoapp/Keyoapp.kt | 54 ++++++++++++-- .../tachiyomi/extension/ar/scans4u/Scans4u.kt | 10 ++- .../extension/en/arvencomics/ArvenComics.kt | 2 + .../tachiyomi/extension/en/ezmanga/EZmanga.kt | 2 + .../extension/en/luascans/LuaScans.kt | 2 +- .../extension/en/magusmanga/MagusManga.kt | 6 +- .../extension/en/necroscans/NecroScans.kt | 8 ++- .../extension/en/rezoscans/RezoScans.kt | 4 +- .../extension/en/suryascans/GenzToons.kt | 70 ++----------------- 11 files changed, 87 insertions(+), 80 deletions(-) create mode 100644 lib-multisrc/keyoapp/assets/i18n/messages_en.properties diff --git a/lib-multisrc/keyoapp/assets/i18n/messages_en.properties b/lib-multisrc/keyoapp/assets/i18n/messages_en.properties new file mode 100644 index 0000000000..bb835eafb7 --- /dev/null +++ b/lib-multisrc/keyoapp/assets/i18n/messages_en.properties @@ -0,0 +1,3 @@ +pref_show_paid_chapter_title=Display paid chapters +pref_show_paid_chapter_summary_on=Paid chapters will appear. +pref_show_paid_chapter_summary_off=Only free chapters will be displayed. diff --git a/lib-multisrc/keyoapp/build.gradle.kts b/lib-multisrc/keyoapp/build.gradle.kts index f0ad544d5c..7ef91ecaf2 100644 --- a/lib-multisrc/keyoapp/build.gradle.kts +++ b/lib-multisrc/keyoapp/build.gradle.kts @@ -2,4 +2,8 @@ plugins { id("lib-multisrc") } -baseVersionCode = 7 +baseVersionCode = 8 + +dependencies { + api(project(":lib:i18n")) +} diff --git a/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt b/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt index b7c0d3a08d..73bab2b481 100644 --- a/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt +++ b/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt @@ -1,6 +1,12 @@ package eu.kanade.tachiyomi.multisrc.keyoapp +import android.app.Application +import android.content.SharedPreferences +import androidx.preference.PreferenceScreen +import androidx.preference.SwitchPreferenceCompat +import eu.kanade.tachiyomi.lib.i18n.Intl import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.ConfigurableSource import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage @@ -17,6 +23,8 @@ import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy import java.text.ParseException import java.text.SimpleDateFormat @@ -27,7 +35,12 @@ abstract class Keyoapp( override val name: String, override val baseUrl: String, final override val lang: String, -) : ParsedHttpSource() { +) : ParsedHttpSource(), ConfigurableSource { + + protected val preferences: SharedPreferences by lazy { + Injekt.get().getSharedPreferences("source_$id", 0x0000) + } + override val supportsLatest = true override val client = network.cloudflareClient @@ -39,6 +52,13 @@ abstract class Keyoapp( private val dateFormat = SimpleDateFormat("MMM d, yyyy", Locale.ENGLISH) + protected val intl = Intl( + language = lang, + baseLanguage = "en", + availableLanguages = setOf("en", "pt-BR", "es"), + classLoader = this::class.java.classLoader!!, + ) + // Popular override fun popularMangaRequest(page: Int): Request = GET(baseUrl, headers) @@ -218,7 +238,12 @@ abstract class Keyoapp( // Chapter list - override fun chapterListSelector(): String = "#chapters > a:not(:has(.text-sm span:matches(Upcoming)))" + override fun chapterListSelector(): String { + if (!preferences.showPaidChapters) { + return "#chapters > a:not(:has(.text-sm span:matches(Upcoming))):not(:has(img[src*=Coin.svg]))" + } + return "#chapters > a:not(:has(.text-sm span:matches(Upcoming)))" + } override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply { setUrlWithoutDomain(element.selectFirst("a[href]")!!.attr("href")) @@ -226,6 +251,9 @@ abstract class Keyoapp( element.selectFirst(".text-xs")?.run { date_upload = text().trim().parseDate() } + if (element.select("img[src*=Coin.svg]").isNotEmpty()) { + name = "🔒 $name" + } } // Image list @@ -235,7 +263,7 @@ abstract class Keyoapp( .map { it.attr("uid") } .filter { it.isNotEmpty() } .mapIndexed { index, img -> - Page(index, document.location(), "$cdnUrl/uploads/$img") + Page(index, document.location(), "$cdnUrl/$img") } .takeIf { it.isNotEmpty() } ?.also { return it } @@ -249,7 +277,7 @@ abstract class Keyoapp( } } - protected val cdnUrl = "https://cdn.igniscans.com" + protected open val cdnUrl = "https://2xffbs-cn8.is1.buzz/uploads" private val oldImgCdnRegex = Regex("""^(https?:)?//cdn\d*\.keyoapp\.com""") @@ -315,4 +343,22 @@ abstract class Keyoapp( } return now.timeInMillis } + + override fun setupPreferenceScreen(screen: PreferenceScreen) { + SwitchPreferenceCompat(screen.context).apply { + key = SHOW_PAID_CHAPTERS_PREF + title = intl["pref_show_paid_chapter_title"] + summaryOn = intl["pref_show_paid_chapter_summary_on"] + summaryOff = intl["pref_show_paid_chapter_summary_off"] + setDefaultValue(SHOW_PAID_CHAPTERS_DEFAULT) + }.also(screen::addPreference) + } + + protected val SharedPreferences.showPaidChapters: Boolean + get() = getBoolean(SHOW_PAID_CHAPTERS_PREF, SHOW_PAID_CHAPTERS_DEFAULT) + + companion object { + private const val SHOW_PAID_CHAPTERS_PREF = "pref_show_paid_chap" + private const val SHOW_PAID_CHAPTERS_DEFAULT = false + } } diff --git a/src/ar/scans4u/src/eu/kanade/tachiyomi/extension/ar/scans4u/Scans4u.kt b/src/ar/scans4u/src/eu/kanade/tachiyomi/extension/ar/scans4u/Scans4u.kt index 5503daa420..1760fb79e4 100644 --- a/src/ar/scans4u/src/eu/kanade/tachiyomi/extension/ar/scans4u/Scans4u.kt +++ b/src/ar/scans4u/src/eu/kanade/tachiyomi/extension/ar/scans4u/Scans4u.kt @@ -2,4 +2,12 @@ package eu.kanade.tachiyomi.extension.ar.scans4u import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp -class Scans4u : Keyoapp("Scans 4u", "https://4uscans.com", "ar") +class Scans4u : Keyoapp("Scans 4u", "https://4uscans.com", "ar") { + + override fun chapterListSelector(): String { + if (!preferences.showPaidChapters) { + return "#chapters > a:not(:has(.text-sm span:matches(قادم))):not(:has(img[src*=Coin.svg]))" + } + return "#chapters > a:not(:has(.text-sm span:matches(قادم)))" + } +} diff --git a/src/en/arvencomics/src/eu/kanade/tachiyomi/extension/en/arvencomics/ArvenComics.kt b/src/en/arvencomics/src/eu/kanade/tachiyomi/extension/en/arvencomics/ArvenComics.kt index b52b1b65ed..84c412bf78 100644 --- a/src/en/arvencomics/src/eu/kanade/tachiyomi/extension/en/arvencomics/ArvenComics.kt +++ b/src/en/arvencomics/src/eu/kanade/tachiyomi/extension/en/arvencomics/ArvenComics.kt @@ -9,4 +9,6 @@ class ArvenComics : Keyoapp( ) { // migrated from Mangathemesia to Keyoapp override val versionId = 2 + + override val cdnUrl = "https://3xfsjdlc.is1.buzz/uploads" } diff --git a/src/en/ezmanga/src/eu/kanade/tachiyomi/extension/en/ezmanga/EZmanga.kt b/src/en/ezmanga/src/eu/kanade/tachiyomi/extension/en/ezmanga/EZmanga.kt index a52a663fb9..e88e036eee 100644 --- a/src/en/ezmanga/src/eu/kanade/tachiyomi/extension/en/ezmanga/EZmanga.kt +++ b/src/en/ezmanga/src/eu/kanade/tachiyomi/extension/en/ezmanga/EZmanga.kt @@ -9,4 +9,6 @@ class EZmanga : Keyoapp( ) { // Migrated from Madara to Keyoapp override val versionId = 2 + + override val cdnUrl = "https://3xfsjdlc.is1.buzz/uploads" } diff --git a/src/en/luascans/src/eu/kanade/tachiyomi/extension/en/luascans/LuaScans.kt b/src/en/luascans/src/eu/kanade/tachiyomi/extension/en/luascans/LuaScans.kt index 632c0d5405..3ffea0d338 100644 --- a/src/en/luascans/src/eu/kanade/tachiyomi/extension/en/luascans/LuaScans.kt +++ b/src/en/luascans/src/eu/kanade/tachiyomi/extension/en/luascans/LuaScans.kt @@ -10,5 +10,5 @@ class LuaScans : Keyoapp( // migrated from MangaThemesia to Keyoapp override val versionId = 2 - override fun chapterListSelector() = "${super.chapterListSelector()}:not(:has(img[src^='/assets/images/Coin.svg']))" + override val cdnUrl = "https://3xfsjdlc.is1.buzz/uploads" } diff --git a/src/en/magusmanga/src/eu/kanade/tachiyomi/extension/en/magusmanga/MagusManga.kt b/src/en/magusmanga/src/eu/kanade/tachiyomi/extension/en/magusmanga/MagusManga.kt index ea0cabef2b..f8cab15ebf 100644 --- a/src/en/magusmanga/src/eu/kanade/tachiyomi/extension/en/magusmanga/MagusManga.kt +++ b/src/en/magusmanga/src/eu/kanade/tachiyomi/extension/en/magusmanga/MagusManga.kt @@ -15,6 +15,8 @@ class MagusManga : Keyoapp( ) { override val versionId = 2 + override val cdnUrl = "https://3xfsjdlc.is1.buzz/uploads" + override val client = network.cloudflareClient.newBuilder() .addInterceptor(::captchaInterceptor) .rateLimitHost(baseUrl.toHttpUrl(), 1) @@ -39,8 +41,4 @@ class MagusManga : Keyoapp( return response } - - override fun chapterListSelector(): String { - return "${super.chapterListSelector()}:not(:has(img[src*=coin]))" - } } diff --git a/src/en/necroscans/src/eu/kanade/tachiyomi/extension/en/necroscans/NecroScans.kt b/src/en/necroscans/src/eu/kanade/tachiyomi/extension/en/necroscans/NecroScans.kt index 69fedc3c04..74e955e35c 100644 --- a/src/en/necroscans/src/eu/kanade/tachiyomi/extension/en/necroscans/NecroScans.kt +++ b/src/en/necroscans/src/eu/kanade/tachiyomi/extension/en/necroscans/NecroScans.kt @@ -2,4 +2,10 @@ package eu.kanade.tachiyomi.extension.en.necroscans import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp -class NecroScans : Keyoapp("Necro Scans", "https://necroscans.com", "en") +class NecroScans : Keyoapp( + "Necro Scans", + "https://necroscans.com", + "en", +) { + override val cdnUrl = "https://3xfsjdlc.is1.buzz/uploads" +} diff --git a/src/en/rezoscans/src/eu/kanade/tachiyomi/extension/en/rezoscans/RezoScans.kt b/src/en/rezoscans/src/eu/kanade/tachiyomi/extension/en/rezoscans/RezoScans.kt index 5d28f77ae1..6af18a08be 100644 --- a/src/en/rezoscans/src/eu/kanade/tachiyomi/extension/en/rezoscans/RezoScans.kt +++ b/src/en/rezoscans/src/eu/kanade/tachiyomi/extension/en/rezoscans/RezoScans.kt @@ -6,6 +6,4 @@ class RezoScans : Keyoapp( "Rezo Scans", "https://rezoscans.com", "en", -) { - override fun chapterListSelector() = "${super.chapterListSelector()}:not(:has(img[src^='/assets/images/Coin.svg']))" -} +) diff --git a/src/en/suryascans/src/eu/kanade/tachiyomi/extension/en/suryascans/GenzToons.kt b/src/en/suryascans/src/eu/kanade/tachiyomi/extension/en/suryascans/GenzToons.kt index 81d84fdf22..a8aa4f674d 100644 --- a/src/en/suryascans/src/eu/kanade/tachiyomi/extension/en/suryascans/GenzToons.kt +++ b/src/en/suryascans/src/eu/kanade/tachiyomi/extension/en/suryascans/GenzToons.kt @@ -1,30 +1,14 @@ package eu.kanade.tachiyomi.extension.en.suryascans -import android.app.Application -import android.content.SharedPreferences -import androidx.preference.PreferenceScreen -import androidx.preference.SwitchPreferenceCompat import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp import eu.kanade.tachiyomi.network.interceptor.rateLimit -import eu.kanade.tachiyomi.source.ConfigurableSource -import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.source.model.SChapter -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element -import uy.kohesive.injekt.Injekt -import uy.kohesive.injekt.api.get import java.util.concurrent.TimeUnit -class GenzToons : - Keyoapp( - "Genz Toons", - "https://genzupdates.com", - "en", - ), - ConfigurableSource { - - private val preferences: SharedPreferences = - Injekt.get().getSharedPreferences("source_$id", 0x0000) +class GenzToons : Keyoapp( + "Genz Toons", + "https://genzupdates.com", + "en", +) { override val client = super.client.newBuilder() .rateLimit(3) @@ -32,48 +16,4 @@ class GenzToons : .writeTimeout(90, TimeUnit.SECONDS) .readTimeout(90, TimeUnit.SECONDS) .build() - - override fun chapterListSelector(): String { - if (!preferences.showPaidChapters) { - return "#chapters > a:not(:has(.text-sm span:matches(Upcoming))):not(:has(img[src*=Coin.svg]))" - } - return "#chapters > a:not(:has(.text-sm span:matches(Upcoming)))" - } - - override fun chapterFromElement(element: Element): SChapter { - return super.chapterFromElement(element).apply { - if (element.select("img[src*=Coin.svg]").isNotEmpty()) { - name = "🔒 $name" - } - } - } - - override fun pageListParse(document: Document): List { - val script = document.select("#pages > script").joinToString("\n") { it.data() } - val realCdnUrl = CDN_URL_REGEX.find(script)?.groupValues?.get(1)?.takeIf { it.startsWith("http") } - ?: "$baseUrl/uploads/" - return document.select("#pages > img") - .mapIndexed { index, img -> - Page(index, document.location(), realCdnUrl + img.attr("uid")) - } - } - - override fun setupPreferenceScreen(screen: PreferenceScreen) { - SwitchPreferenceCompat(screen.context).apply { - key = SHOW_PAID_CHAPTERS_PREF - title = "Display paid chapters" - summaryOn = "Paid chapters will appear." - summaryOff = "Only free chapters will be displayed." - setDefaultValue(SHOW_PAID_CHAPTERS_DEFAULT) - }.also(screen::addPreference) - } - - private val SharedPreferences.showPaidChapters: Boolean - get() = getBoolean(SHOW_PAID_CHAPTERS_PREF, SHOW_PAID_CHAPTERS_DEFAULT) - - companion object { - private const val SHOW_PAID_CHAPTERS_PREF = "pref_show_paid_chap" - private const val SHOW_PAID_CHAPTERS_DEFAULT = false - private val CDN_URL_REGEX = """realUrl\s*=\s*`([^`]+?)\$""".toRegex() - } } From 53f8dc9803c418034a9ee7b7daf5ae00e507c926 Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Thu, 24 Oct 2024 06:44:11 -0500 Subject: [PATCH 6/9] MiauScan: Update domain (#5669) * update domain * bump --- src/all/miauscan/build.gradle | 4 ++-- .../tachiyomi/extension/all/miauscan/MiauScanFactory.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/all/miauscan/build.gradle b/src/all/miauscan/build.gradle index 0eaceea9ce..c1e6b11899 100644 --- a/src/all/miauscan/build.gradle +++ b/src/all/miauscan/build.gradle @@ -2,8 +2,8 @@ ext { extName = 'Miau Scan' extClass = '.MiauScanFactory' themePkg = 'mangathemesia' - baseUrl = 'https://lectormiau.com' - overrideVersionCode = 4 + baseUrl = 'https://zonamiau.com' + overrideVersionCode = 5 } apply from: "$rootDir/common.gradle" diff --git a/src/all/miauscan/src/eu/kanade/tachiyomi/extension/all/miauscan/MiauScanFactory.kt b/src/all/miauscan/src/eu/kanade/tachiyomi/extension/all/miauscan/MiauScanFactory.kt index 9b08a825dc..e6a39e08e7 100644 --- a/src/all/miauscan/src/eu/kanade/tachiyomi/extension/all/miauscan/MiauScanFactory.kt +++ b/src/all/miauscan/src/eu/kanade/tachiyomi/extension/all/miauscan/MiauScanFactory.kt @@ -20,7 +20,7 @@ class MiauScanFactory : SourceFactory { open class MiauScan(lang: String) : MangaThemesia( name = "Miau Scan", - baseUrl = "https://lectormiau.com", + baseUrl = "https://zonamiau.com", lang = lang, dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")), ) { From a424bf6607c749c2b20fa0a3d633f9a7f4a50942 Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Thu, 24 Oct 2024 06:44:35 -0500 Subject: [PATCH 7/9] VisorInari: Update domain (#5670) update domain --- src/es/inarimanga/build.gradle | 4 ++-- .../eu/kanade/tachiyomi/extension/es/inarimanga/VisorInari.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/es/inarimanga/build.gradle b/src/es/inarimanga/build.gradle index 1f7f50d9a0..95130c98a6 100644 --- a/src/es/inarimanga/build.gradle +++ b/src/es/inarimanga/build.gradle @@ -2,8 +2,8 @@ ext { extName = 'Visor Inari' extClass = '.VisorInari' themePkg = 'mangathemesia' - baseUrl = 'https://visorinari.com' - overrideVersionCode = 13 + baseUrl = 'https://vrinari.org' + overrideVersionCode = 14 isNsfw = true } diff --git a/src/es/inarimanga/src/eu/kanade/tachiyomi/extension/es/inarimanga/VisorInari.kt b/src/es/inarimanga/src/eu/kanade/tachiyomi/extension/es/inarimanga/VisorInari.kt index b413b7ed25..1766175701 100644 --- a/src/es/inarimanga/src/eu/kanade/tachiyomi/extension/es/inarimanga/VisorInari.kt +++ b/src/es/inarimanga/src/eu/kanade/tachiyomi/extension/es/inarimanga/VisorInari.kt @@ -8,7 +8,7 @@ import java.util.Locale class VisorInari : MangaThemesia( "Visor Inari", - "https://visorinari.com", + "https://vrinari.org", "es", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")), ) { From df45384c73d1b49f9ac72f18d67feff226a23626 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+choppeh@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:45:32 -0300 Subject: [PATCH 8/9] XXManhwa/Komikindo: Update domains (#5671) Update domain --- src/id/komikindo/build.gradle | 4 ++-- .../tachiyomi/extension/id/komikindo/Komikindo.kt | 2 +- src/vi/xxmanhwa/build.gradle | 2 +- .../kanade/tachiyomi/extension/vi/xxmanhwa/XxManhwa.kt | 10 +++++++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/id/komikindo/build.gradle b/src/id/komikindo/build.gradle index bb5016b522..86923cd1fb 100644 --- a/src/id/komikindo/build.gradle +++ b/src/id/komikindo/build.gradle @@ -2,8 +2,8 @@ ext { extName = 'Komikindo' extClass = '.Komikindo' themePkg = 'mangathemesia' - baseUrl = 'https://komikindo.sbs' - overrideVersionCode = 0 + baseUrl = 'https://komikindo.icu' + overrideVersionCode = 1 isNsfw = true } diff --git a/src/id/komikindo/src/eu/kanade/tachiyomi/extension/id/komikindo/Komikindo.kt b/src/id/komikindo/src/eu/kanade/tachiyomi/extension/id/komikindo/Komikindo.kt index 19b289977c..0036a37817 100644 --- a/src/id/komikindo/src/eu/kanade/tachiyomi/extension/id/komikindo/Komikindo.kt +++ b/src/id/komikindo/src/eu/kanade/tachiyomi/extension/id/komikindo/Komikindo.kt @@ -8,7 +8,7 @@ import org.jsoup.nodes.Document class Komikindo : MangaThemesia( "Komikindo", - "https://komikindo.sbs", + "https://komikindo.icu", "id", ) { // Some covers fail to load with no Accept header + no resize parameter. diff --git a/src/vi/xxmanhwa/build.gradle b/src/vi/xxmanhwa/build.gradle index f3cbad569f..b79494cd31 100644 --- a/src/vi/xxmanhwa/build.gradle +++ b/src/vi/xxmanhwa/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'XXManhwa' extClass = '.XxManhwa' - extVersionCode = 2 + extVersionCode = 3 isNsfw = true } diff --git a/src/vi/xxmanhwa/src/eu/kanade/tachiyomi/extension/vi/xxmanhwa/XxManhwa.kt b/src/vi/xxmanhwa/src/eu/kanade/tachiyomi/extension/vi/xxmanhwa/XxManhwa.kt index a4de362874..dc250bf254 100644 --- a/src/vi/xxmanhwa/src/eu/kanade/tachiyomi/extension/vi/xxmanhwa/XxManhwa.kt +++ b/src/vi/xxmanhwa/src/eu/kanade/tachiyomi/extension/vi/xxmanhwa/XxManhwa.kt @@ -31,7 +31,7 @@ class XxManhwa : ParsedHttpSource(), ConfigurableSource { override val lang = "vi" - override val baseUrl = "https://xxmanhwas.net" + override val baseUrl = "https://xxmanhwa.top" override val supportsLatest = false @@ -147,13 +147,17 @@ class XxManhwa : ParsedHttpSource(), ConfigurableSource { } } + document.selectFirst("form[method=post] > input[type=hidden]")?.let { csrf -> + add(csrf.attr("name"), csrf.attr("value")) + } + add("iid", "_0_$iid") add("ipoi", "1") add("sid", chapterId) add("cid", mangaId) add("expiry", expiry) add("token", token) - add("src", src) + add("src", "/${src.substringAfterLast("/")}") val ebeCaptchaKey = html.substringAfter("action_ebe_captcha('").substringBefore("')") val ebeCaptchaRequest = POST( @@ -175,7 +179,7 @@ class XxManhwa : ParsedHttpSource(), ConfigurableSource { val basePageUrl = "https://${resp.media}/${resp.src.substringBeforeLast("/")}/" return document.select("div.cur p[data-src]").mapIndexed { i, it -> - Page(i, imageUrl = basePageUrl + it.attr("data-src")) + Page(i, imageUrl = basePageUrl + it.attr("data-src").substringAfterLast("/")) } } From 69aa93d7d484e8a753c566bb4c6411db17a249c0 Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:46:45 +0500 Subject: [PATCH 9/9] remove unavailable intl --- .../keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt b/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt index 73bab2b481..f166ed56ac 100644 --- a/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt +++ b/lib-multisrc/keyoapp/src/eu/kanade/tachiyomi/multisrc/keyoapp/Keyoapp.kt @@ -55,7 +55,7 @@ abstract class Keyoapp( protected val intl = Intl( language = lang, baseLanguage = "en", - availableLanguages = setOf("en", "pt-BR", "es"), + availableLanguages = setOf("en"), classLoader = this::class.java.classLoader!!, )