diff --git a/multisrc/overrides/mangathemesia/potatomanga/src/PotatoManga.kt b/multisrc/overrides/mangathemesia/potatomanga/src/PotatoManga.kt index 44eea894c..c31d73e7a 100644 --- a/multisrc/overrides/mangathemesia/potatomanga/src/PotatoManga.kt +++ b/multisrc/overrides/mangathemesia/potatomanga/src/PotatoManga.kt @@ -1,6 +1,8 @@ package eu.kanade.tachiyomi.extension.ar.potatomanga import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Request import java.text.SimpleDateFormat import java.util.Locale @@ -8,6 +10,7 @@ class PotatoManga : MangaThemesia( "PotatoManga", "https://potatomanga.xyz", "ar", + mangaUrlDirectory = "/series", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("ar")), ) { override val seriesArtistSelector = @@ -20,4 +23,18 @@ class PotatoManga : MangaThemesia( ".infotable tr:contains(النوع) td:last-child, ${super.seriesTypeSelector}" override val seriesAltNameSelector = ".infotable tr:contains(الأسماء الثانوية) td:last-child, ${super.seriesAltNameSelector}" + + override fun mangaDetailsRequest(manga: SManga): Request { + if (manga.url.startsWith("/manga")) { + manga.url.replaceFirst("/manga", mangaUrlDirectory) + } + return super.mangaDetailsRequest(manga) + } + + override fun chapterListRequest(manga: SManga): Request { + if (manga.url.startsWith("/manga")) { + manga.url.replaceFirst("/manga", mangaUrlDirectory) + } + return super.chapterListRequest(manga) + } } 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 2d28945ce..d17c14d76 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 @@ -113,7 +113,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("Phantom Scans", "https://phantomscans.com", "en", overrideVersionCode = 1), SingleLang("PhenixScans", "https://phenixscans.fr", "fr", className = "PhenixScans", overrideVersionCode = 1), SingleLang("Pi Scans", "https://piscans.in", "id", overrideVersionCode = 1), - SingleLang("PotatoManga", "https://potatomanga.xyz", "ar"), + SingleLang("PotatoManga", "https://potatomanga.xyz", "ar", overrideVersionCode = 1), SingleLang("Quantum Scans", "https://readers-point.space", "en"), SingleLang("Raiki Scan", "https://raikiscan.com", "es"), SingleLang("Raiscans", "https://www.raiscans.com", "en"),