PotatoManga: update mangaUrlDirectory (#19271)

This commit is contained in:
AwkwardPeak7 2023-12-11 19:41:34 +05:00 committed by GitHub
parent e6e96603f7
commit db54abf84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -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)
}
}

View File

@ -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"),