From 406e2ddfb54c167f868cf04c8f0d02171620111c Mon Sep 17 00:00:00 2001 From: Fathi Ahmed <67505416+Programmer-0-0@users.noreply.github.com> Date: Sun, 30 Apr 2023 02:26:55 +0300 Subject: [PATCH] Fix arena scans duplicate pages (#16223) * Create ArenaScans.kt Added 'Arena Scans' src override for img selector to mitigate duplicate pages Image selector was returning 2 images for each image (img tag and the noscript img tag). So, added attribute [data-src] which is only available on img under 'readerarea' and not for noscript img. This results in returning one image per img tag. * Update MangaThemesiaGenerator.kt --- .../overrides/mangathemesia/arenascans/src/ArenaScans.kt | 7 +++++++ .../multisrc/mangathemesia/MangaThemesiaGenerator.kt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 multisrc/overrides/mangathemesia/arenascans/src/ArenaScans.kt diff --git a/multisrc/overrides/mangathemesia/arenascans/src/ArenaScans.kt b/multisrc/overrides/mangathemesia/arenascans/src/ArenaScans.kt new file mode 100644 index 000000000..504c640e0 --- /dev/null +++ b/multisrc/overrides/mangathemesia/arenascans/src/ArenaScans.kt @@ -0,0 +1,7 @@ +package eu.kanade.tachiyomi.extension.en.arenascans + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia + +class ArenaScans : MangaThemesia("Arena Scans", "https://arenascans.net", "en") { + override val pageSelector = "div#readerarea img[data-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 0c30bda43..4ef48982a 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 @@ -20,7 +20,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { MultiLang("Miau Scan", "https://miauscan.com", listOf("es", "pt-BR")), SingleLang("Animated Glitched Scans", "https://anigliscans.com", "en"), SingleLang("Arcane scan", "https://arcanescan.fr", "fr"), - SingleLang("Arena Scans", "https://arenascans.net", "en"), + SingleLang("Arena Scans", "https://arenascans.net", "en", overrideVersionCode = 1), SingleLang("Azure Scans", "https://azuremanga.com", "en", overrideVersionCode = 1), SingleLang("Boosei", "https://boosei.net", "id", overrideVersionCode = 2), SingleLang("Babel Wuxia", "https://babelwuxia.com", "en", overrideVersionCode = 1),