diff --git a/multisrc/overrides/madara/mangastk/src/MangasTK.kt b/multisrc/overrides/madara/mangastk/src/MangasTK.kt index a549f5375..4212c7cbb 100644 --- a/multisrc/overrides/madara/mangastk/src/MangasTK.kt +++ b/multisrc/overrides/madara/mangastk/src/MangasTK.kt @@ -13,7 +13,7 @@ class MangasTK : Madara( "es", SimpleDateFormat("dd.MM.yyyy", Locale("es")), ) { - override fun popularMangaSelector() = "div#series-card:not(:has(a[href*='bilibilicomics.com']))" + override fun popularMangaSelector() = "div#series-card:has(a:not([href*='bilibilicomics.com']))" override val popularMangaUrlSelector = "a.series-link" override val mangaDetailsSelectorTag = "div.tags-content a.notUsed" // Source use this for the scanlator diff --git a/multisrc/overrides/madara/mangastk18/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/mangastk18/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..af02e5668 Binary files /dev/null and b/multisrc/overrides/madara/mangastk18/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastk18/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/mangastk18/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..3145bc9a9 Binary files /dev/null and b/multisrc/overrides/madara/mangastk18/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastk18/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/mangastk18/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..81f792755 Binary files /dev/null and b/multisrc/overrides/madara/mangastk18/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastk18/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/mangastk18/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..7304c324d Binary files /dev/null and b/multisrc/overrides/madara/mangastk18/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastk18/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/mangastk18/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..e818270b6 Binary files /dev/null and b/multisrc/overrides/madara/mangastk18/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastk18/res/web_hi_res_512.png b/multisrc/overrides/madara/mangastk18/res/web_hi_res_512.png new file mode 100644 index 000000000..2393ecee0 Binary files /dev/null and b/multisrc/overrides/madara/mangastk18/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/madara/mangastk18/src/MangasTK18.kt b/multisrc/overrides/madara/mangastk18/src/MangasTK18.kt new file mode 100644 index 000000000..66f0f9543 --- /dev/null +++ b/multisrc/overrides/madara/mangastk18/src/MangasTK18.kt @@ -0,0 +1,54 @@ +package eu.kanade.tachiyomi.extension.es.mangastk18 + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import org.jsoup.nodes.Element +import java.text.SimpleDateFormat +import java.util.Locale + +class MangasTK18 : Madara( + "MangasTK18", + "https://mangastk18.com", + "es", + SimpleDateFormat("dd.MM.yyyy", Locale("es")), +) { + override fun popularMangaSelector() = "div#series-card:has(a:not([href*='bilibilicomics.com']))" + override val popularMangaUrlSelector = "a.series-link" + + override val mangaDetailsSelectorTag = "div.tags-content a.notUsed" // Source use this for the scanlator + override val mangaDetailsSelectorStatus = "div.post-status div.summary-content" + + override fun popularMangaFromElement(element: Element): SManga { + val manga = SManga.create() + + with(element) { + select(popularMangaUrlSelector).first()?.let { + manga.setUrlWithoutDomain(it.attr("abs:href")) + manga.title = it.attr("title") + } + + select("img").first()?.let { + manga.thumbnail_url = imageFromElement(it) + } + } + + return manga + } + + override fun chapterFromElement(element: Element): SChapter { + val chapter = SChapter.create() + + with(element) { + select(chapterUrlSelector).first()?.let { urlElement -> + chapter.url = urlElement.attr("abs:href").let { + it.substringBefore("?style=paged") + if (!it.endsWith(chapterUrlSuffix)) chapterUrlSuffix else "" + } + chapter.name = urlElement.select("p.chapter-manhwa-title").text() + chapter.date_upload = parseChapterDate(select("span.chapter-release-date").text()) + } + } + + return chapter + } +} diff --git a/multisrc/overrides/madara/mangastkxyz/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/mangastkxyz/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..14ac8fd1a Binary files /dev/null and b/multisrc/overrides/madara/mangastkxyz/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastkxyz/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/mangastkxyz/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..e3b8ec761 Binary files /dev/null and b/multisrc/overrides/madara/mangastkxyz/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastkxyz/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/mangastkxyz/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..606021541 Binary files /dev/null and b/multisrc/overrides/madara/mangastkxyz/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastkxyz/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/mangastkxyz/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..30476d13a Binary files /dev/null and b/multisrc/overrides/madara/mangastkxyz/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastkxyz/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/mangastkxyz/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..1121c325b Binary files /dev/null and b/multisrc/overrides/madara/mangastkxyz/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/mangastkxyz/res/web_hi_res_512.png b/multisrc/overrides/madara/mangastkxyz/res/web_hi_res_512.png new file mode 100644 index 000000000..defce4d93 Binary files /dev/null and b/multisrc/overrides/madara/mangastkxyz/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/madara/mangastkxyz/src/MangasTkXyz.kt b/multisrc/overrides/madara/mangastkxyz/src/MangasTkXyz.kt new file mode 100644 index 000000000..f09e93b6f --- /dev/null +++ b/multisrc/overrides/madara/mangastkxyz/src/MangasTkXyz.kt @@ -0,0 +1,54 @@ +package eu.kanade.tachiyomi.extension.es.mangastkxyz + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import org.jsoup.nodes.Element +import java.text.SimpleDateFormat +import java.util.Locale + +class MangasTkXyz : Madara( + "MangasTK.xyz", + "https://mangastk.xyz", + "es", + SimpleDateFormat("dd.MM.yyyy", Locale("es")), +) { + override fun popularMangaSelector() = "div#series-card:has(a:not([href*='bilibilicomics.com']))" + override val popularMangaUrlSelector = "a.series-link" + + override val mangaDetailsSelectorTag = "div.tags-content a.notUsed" // Source use this for the scanlator + override val mangaDetailsSelectorStatus = "div.post-status div.summary-content" + + override fun popularMangaFromElement(element: Element): SManga { + val manga = SManga.create() + + with(element) { + select(popularMangaUrlSelector).first()?.let { + manga.setUrlWithoutDomain(it.attr("abs:href")) + manga.title = it.attr("title") + } + + select("img").first()?.let { + manga.thumbnail_url = imageFromElement(it) + } + } + + return manga + } + + override fun chapterFromElement(element: Element): SChapter { + val chapter = SChapter.create() + + with(element) { + select(chapterUrlSelector).first()?.let { urlElement -> + chapter.url = urlElement.attr("abs:href").let { + it.substringBefore("?style=paged") + if (!it.endsWith(chapterUrlSuffix)) chapterUrlSuffix else "" + } + chapter.name = urlElement.select("p.chapter-manhwa-title").text() + chapter.date_upload = parseChapterDate(select("span.chapter-release-date").text()) + } + } + + return chapter + } +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index bf24624d6..5d65db57e 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -251,7 +251,9 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("MangaSiro", "https://mangasiro.com", "en", isNsfw = true), SingleLang("MangaSpark", "https://mangaspark.com", "ar", overrideVersionCode = 2), SingleLang("MangaStic", "https://mangastic.me", "en", overrideVersionCode = 1), - SingleLang("MangasTK", "https://mangastk.net", "es", isNsfw = true, overrideVersionCode = 2), + SingleLang("MangasTK", "https://mangastk.net", "es", isNsfw = true, overrideVersionCode = 3), + SingleLang("MangasTK18", "https://mangastk18.com", "es", isNsfw = true), + SingleLang("MangasTK.xyz", "https://mangastk.xyz", "es", className = "MangasTkXyz"), SingleLang("Mangasushi", "https://mangasushi.org", "en", overrideVersionCode = 3), SingleLang("MangaTone", "https://mangatone.com", "en"), SingleLang("MangaToRead", "https://mangatoread.com", "en"),