diff --git a/.github/workflows/issue_moderator.yml b/.github/workflows/issue_moderator.yml index 8d039f306..2278ba01e 100644 --- a/.github/workflows/issue_moderator.yml +++ b/.github/workflows/issue_moderator.yml @@ -43,7 +43,7 @@ jobs: }, { "type": "both", - "regex": ".*(team\\s*x|tqneplus|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|mnhaestate|swat\\s*manga|manga\\s*swat|reset(?:\\s*|-)scan|manga-flix\\.com|astra\\s*scans|manganoon|manga(?:-|\\s*)pro|coven\\s*scans?|shinobiscans).*", + "regex": ".*(team\\s*x|tqneplus|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|mnhaestate|reset(?:\\s*|-)scan|manga-flix\\.com|astra\\s*scans|manganoon|manga(?:-|\\s*)pro|coven\\s*scans?|shinobiscans).*", "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 942836ea5..601917ea4 100644 --- a/REMOVED_SOURCES.md +++ b/REMOVED_SOURCES.md @@ -38,7 +38,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..b4d077aac --- /dev/null +++ b/multisrc/overrides/mangathemesia/mangaswat/src/MangaSwat.kt @@ -0,0 +1,57 @@ +package eu.kanade.tachiyomi.extension.ar.mangaswat + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.Page +import okhttp3.Headers +import okhttp3.Request +import org.json.JSONObject +import org.jsoup.nodes.Document +import java.text.SimpleDateFormat +import java.util.Locale + +class MangaSwat : MangaThemesia( + "MangaSwat", + "https://swatmanga.me", + "ar", + dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.US) +) { + + override fun headersBuilder(): Headers.Builder = Headers.Builder() + .add( + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" + ) + .add("Accept-language", "en-US,en;q=0.9") + .add("Referer", baseUrl) + + override fun imageRequest(page: Page): Request { + val newHeaders = headersBuilder() + .set("Accept", "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8") + .set("Referer", baseUrl) + .build() + return GET(page.imageUrl!!, newHeaders) + } + + 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 val pageSelector = "div#readerarea img" + + override fun pageListParse(document: Document): List { + var page: List? = null + val scriptContent = document.selectFirst("script:containsData(ts_reader)").data() + val removeHead = scriptContent.replace("ts_reader.run(", "").replace(");", "") + val jsonObject = JSONObject(removeHead) + val sourcesArray = jsonObject.getJSONArray("sources") + val imagesArray = sourcesArray.getJSONObject(0).getJSONArray("images") + page = List(imagesArray.length()) { i -> + Page(i, "", imagesArray[i].toString()) + } + + return page + } +} 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 11d8a1f28..d36e24d04 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 @@ -63,6 +63,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.me", "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),