diff --git a/.github/workflows/issue_moderator.yml b/.github/workflows/issue_moderator.yml index 62102fd34..6ec73c28b 100644 --- a/.github/workflows/issue_moderator.yml +++ b/.github/workflows/issue_moderator.yml @@ -43,7 +43,7 @@ jobs: }, { "type": "both", - "regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|mangagegecesi|knightnoscanlations|ahstudios|mangagecesi|nartag|xxx\\s*yaoi|yaoi\\s*fan\\s*clube|luminous|dragontea|manhwaid\\.org|hunters\\s*scan|reset(?:\\s*|-)scan|manga-flix\\.com|astra\\s*scans|manganoon|manga(?:-|\\s*)pro|coven\\s*scans?|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?|swatmanga).*", + "regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|mangagegecesi|knightnoscanlations|ahstudios|mangagecesi|nartag|xxx\\s*yaoi|yaoi\\s*fan\\s*clube|luminous|dragontea|manhwaid\\.org|hunters\\s*scan|reset(?:\\s*|-)scan|manga-flix\\.com|astra\\s*scans|manganoon|manga(?:-|\\s*)pro|coven\\s*scans?|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?).*", "ignoreCase": true, "message": "{match} will not be added back as the scanlator team has requested it to be removed. Read #3475 for more information." }, diff --git a/REMOVED_SOURCES.md b/REMOVED_SOURCES.md index e10dd00d3..dd2b6893a 100644 --- a/REMOVED_SOURCES.md +++ b/REMOVED_SOURCES.md @@ -37,7 +37,6 @@ - Mangagecesi https://github.com/tachiyomiorg/tachiyomi-extensions/issues/5367 - Manganoon https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13866 - MangaPro https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13989 -- MangaSwat https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13171 - Mangawow https://github.com/tachiyomiorg/tachiyomi-extensions/issues/5367 - Manhwaid.org https://github.com/tachiyomiorg/tachiyomi-extensions/issues/10751 - NarTag https://github.com/tachiyomiorg/tachiyomi-extensions/issues/8038 diff --git a/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..2cd84f335 Binary files /dev/null and b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..db49ab7c8 Binary files /dev/null and b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..9ba020142 Binary files /dev/null and b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..331bdab72 Binary files /dev/null and b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..1b4d2ba43 Binary files /dev/null and b/multisrc/overrides/mangathemesia/mangaswat/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/mangaswat/res/web_hi_res_512.png b/multisrc/overrides/mangathemesia/mangaswat/res/web_hi_res_512.png new file mode 100644 index 000000000..963f86a5e Binary files /dev/null and b/multisrc/overrides/mangathemesia/mangaswat/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangathemesia/mangaswat/src/MangaSwat.kt b/multisrc/overrides/mangathemesia/mangaswat/src/MangaSwat.kt new file mode 100644 index 000000000..ea97a5476 --- /dev/null +++ b/multisrc/overrides/mangathemesia/mangaswat/src/MangaSwat.kt @@ -0,0 +1,51 @@ +package eu.kanade.tachiyomi.extension.ar.mangaswat + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.model.Page +import kotlinx.serialization.Serializable +import kotlinx.serialization.decodeFromString +import okhttp3.Headers +import okhttp3.OkHttpClient +import org.jsoup.nodes.Document +import java.text.SimpleDateFormat +import java.util.Locale + +class MangaSwat : MangaThemesia( + "MangaSwat", + "https://swatmanga.net", + "ar", + dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.US) +) { + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(1) + .build() + + override fun headersBuilder(): Headers.Builder = super.headersBuilder() + .add("Referer", "$baseUrl/") + + override val seriesArtistSelector = "span:contains(الناشر) i" + override val seriesAuthorSelector = "span:contains(المؤلف) i" + override val seriesGenreSelector = "span:contains(التصنيف) a, .mgen a" + override val seriesTypeSelector = "span:contains(النوع) a" + override val seriesStatusSelector = "span:contains(الحالة)" + + override fun pageListParse(document: Document): List { + val scriptContent = document.selectFirst("script:containsData(ts_reader)").data() + val jsonString = scriptContent.substringAfter("ts_reader.run(").substringBefore(");") + val tsReader = json.decodeFromString(jsonString) + val imageUrls = tsReader.sources.firstOrNull()?.images ?: return emptyList() + return imageUrls.mapIndexed { index, imageUrl -> Page(index, imageUrl = imageUrl) } + } + + @Serializable + data class TSReader( + val sources: List, + ) + + @Serializable + data class ReaderImageSource( + val source: String, + val images: List, + ) +} 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 7648dfca6..bd5a4e696 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 @@ -64,6 +64,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("MangaTale", "https://mangatale.co", "id"), SingleLang("MangaWT", "https://mangawt.com", "tr", overrideVersionCode = 5), SingleLang("Mangayaro", "https://mangayaro.net", "id"), + SingleLang("MangaSwat", "https://swatmanga.net", "ar", overrideVersionCode = 6), SingleLang("MangKomik", "https://mangkomik.net", "id", overrideVersionCode = 1), SingleLang("Mangás Chan", "https://mangaschan.com", "pt-BR", className = "MangasChan"), SingleLang("Manhwa Freak", "https://manhwafreak.com", "en", overrideVersionCode = 1),