From b369252c51ec952bc8692b3f083cb3cccc8a176b Mon Sep 17 00:00:00 2001 From: jamesnorritz <91746163+jamesnorritz@users.noreply.github.com> Date: Sat, 26 Nov 2022 05:47:45 +0530 Subject: [PATCH] Fix for #14352 #14266 (#14381) Fix for #14352 #14266 Closes #14352 Closes #14266 Added 'Cosmic 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 noscrpt img. This results in returning one image per img tag. Checklist: [-] Updated extVersionCode value in build.gradle for individual extensions [x] Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions [x] Referenced all related issues in the PR body (e.g. "Closes #xyz") [-] Added the isNsfw = true flag in build.gradle when appropriate [x] Have not changed source names [-] Have explicitly kept the id if a source's name or language were changed [x] Have tested the modifications by compiling and running the extension through Android Studio --- .../overrides/mangathemesia/cosmicscans/src/CosmicScans.kt | 7 +++++++ .../multisrc/mangathemesia/MangaThemesiaGenerator.kt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 multisrc/overrides/mangathemesia/cosmicscans/src/CosmicScans.kt diff --git a/multisrc/overrides/mangathemesia/cosmicscans/src/CosmicScans.kt b/multisrc/overrides/mangathemesia/cosmicscans/src/CosmicScans.kt new file mode 100644 index 000000000..f4c886848 --- /dev/null +++ b/multisrc/overrides/mangathemesia/cosmicscans/src/CosmicScans.kt @@ -0,0 +1,7 @@ +package eu.kanade.tachiyomi.extension.en.cosmicscans + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia + +class CosmicScans : MangaThemesia("Cosmic Scans", "https://cosmicscans.com", "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 fd84c4a61..167c291ad 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 @@ -26,7 +26,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("Boosei", "https://boosei.net", "id", overrideVersionCode = 2), SingleLang("Clayrer", "https://clayrer.net", "es"), SingleLang("Constellar Scans", "https://constellarscans.com", "en", isNsfw = true, overrideVersionCode = 1), - SingleLang("Cosmic Scans", "https://cosmicscans.com", "en"), + SingleLang("Cosmic Scans", "https://cosmicscans.com", "en", overrideVersionCode = 1), SingleLang("Dojing.net", "https://dojing.net", "id", isNsfw = true, className = "DojingNet"), SingleLang("DuniaKomik.id", "https://duniakomik.id", "id", className = "DuniaKomikId"), SingleLang("FlameScans.fr", "https://flamescans.fr", "fr", className = "FlameScansFR"),