From 37565f0925cc828fbfb3690b38ffa1102b3396bf Mon Sep 17 00:00:00 2001 From: Ejan <35057681+e-shl@users.noreply.github.com> Date: Tue, 3 May 2022 21:18:41 +0500 Subject: [PATCH] [RU]Grouple exclusion of planned chapters (#11712) * [RU]Grouple exclusion of planned chapters * category priority --- src/ru/allhentai/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/ru/allhentai/AllHentai.kt | 4 ++-- src/ru/mintmanga/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt | 4 ++-- src/ru/readmanga/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt | 4 ++-- src/ru/selfmanga/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/ru/selfmanga/Selfmanga.kt | 6 +++--- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ru/allhentai/build.gradle b/src/ru/allhentai/build.gradle index 178b792ec..e12e3d923 100644 --- a/src/ru/allhentai/build.gradle +++ b/src/ru/allhentai/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'AllHentai' pkgNameSuffix = 'ru.allhentai' extClass = '.AllHentai' - extVersionCode = 18 + extVersionCode = 19 isNsfw = true } diff --git a/src/ru/allhentai/src/eu/kanade/tachiyomi/extension/ru/allhentai/AllHentai.kt b/src/ru/allhentai/src/eu/kanade/tachiyomi/extension/ru/allhentai/AllHentai.kt index 9c28997d8..61732070b 100644 --- a/src/ru/allhentai/src/eu/kanade/tachiyomi/extension/ru/allhentai/AllHentai.kt +++ b/src/ru/allhentai/src/eu/kanade/tachiyomi/extension/ru/allhentai/AllHentai.kt @@ -152,7 +152,7 @@ class AllHentai : ConfigurableSource, ParsedHttpSource() { manga.title = document.select("h1.names .name").text() manga.author = authorElement manga.artist = infoElement.select("span.elem_illustrator").first()?.text() - manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() } + manga.genre = category + ", " + infoElement.select("span.elem_genre").text().split(",").joinToString { it.trim() } manga.description = document.select("div#tab-description .manga-description").text() manga.status = parseStatus(infoElement.html()) manga.thumbnail_url = infoElement.select("img").attr("data-full") @@ -183,7 +183,7 @@ class AllHentai : ConfigurableSource, ParsedHttpSource() { return document.select(chapterListSelector()).map { chapterFromElement(it, manga) } } - override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a)" + override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a):has(td.date:not(.text-info))" private fun chapterFromElement(element: Element, manga: SManga): SChapter { val urlElement = element.select("a").first() diff --git a/src/ru/mintmanga/build.gradle b/src/ru/mintmanga/build.gradle index cdef8cac5..35cca7a80 100644 --- a/src/ru/mintmanga/build.gradle +++ b/src/ru/mintmanga/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Mintmanga' pkgNameSuffix = 'ru.mintmanga' extClass = '.Mintmanga' - extVersionCode = 41 + extVersionCode = 42 } dependencies { diff --git a/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt b/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt index 6d0b67a60..326e977a8 100644 --- a/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt +++ b/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/Mintmanga.kt @@ -180,7 +180,7 @@ class Mintmanga : ConfigurableSource, ParsedHttpSource() { manga.title = document.select("h1.names .name").text() manga.author = authorElement manga.artist = infoElement.select("span.elem_illustrator").first()?.text() - manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).plusElement(rawAgeStop).joinToString { it.trim() } + manga.genre = category + ", " + rawAgeStop + ", " + infoElement.select("span.elem_genre").text().split(",").joinToString { it.trim() } var altName = "" if (infoElement.select(".another-names").isNotEmpty()) { altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n" @@ -215,7 +215,7 @@ class Mintmanga : ConfigurableSource, ParsedHttpSource() { return document.select(chapterListSelector()).map { chapterFromElement(it, manga) } } - override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a)" + override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a):has(td.date:not(.text-info))" private fun chapterFromElement(element: Element, manga: SManga): SChapter { val urlElement = element.select("a").first() diff --git a/src/ru/readmanga/build.gradle b/src/ru/readmanga/build.gradle index 95beef778..87a54516c 100644 --- a/src/ru/readmanga/build.gradle +++ b/src/ru/readmanga/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Readmanga' pkgNameSuffix = 'ru.readmanga' extClass = '.Readmanga' - extVersionCode = 40 + extVersionCode = 41 } dependencies { diff --git a/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt b/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt index acdfdf00c..5a24670a9 100644 --- a/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt +++ b/src/ru/readmanga/src/eu/kanade/tachiyomi/extension/ru/readmanga/Readmanga.kt @@ -181,7 +181,7 @@ class Readmanga : ConfigurableSource, ParsedHttpSource() { manga.title = document.select("h1.names .name").text() manga.author = authorElement manga.artist = infoElement.select("span.elem_illustrator").first()?.text() - manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).plusElement(rawAgeStop).joinToString { it.trim() } + manga.genre = category + ", " + rawAgeStop + ", " + infoElement.select("span.elem_genre").text().split(",").joinToString { it.trim() } var altName = "" if (infoElement.select(".another-names").isNotEmpty()) { altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n" @@ -216,7 +216,7 @@ class Readmanga : ConfigurableSource, ParsedHttpSource() { return document.select(chapterListSelector()).map { chapterFromElement(it, manga) } } - override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a)" + override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a):has(td.date:not(.text-info))" private fun chapterFromElement(element: Element, manga: SManga): SChapter { val urlElement = element.select("a").first() diff --git a/src/ru/selfmanga/build.gradle b/src/ru/selfmanga/build.gradle index 23c28bd34..6fb572c4b 100644 --- a/src/ru/selfmanga/build.gradle +++ b/src/ru/selfmanga/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Selfmanga' pkgNameSuffix = 'ru.selfmanga' extClass = '.Selfmanga' - extVersionCode = 18 + extVersionCode = 19 } dependencies { diff --git a/src/ru/selfmanga/src/eu/kanade/tachiyomi/extension/ru/selfmanga/Selfmanga.kt b/src/ru/selfmanga/src/eu/kanade/tachiyomi/extension/ru/selfmanga/Selfmanga.kt index ce666f2fe..ac31a1174 100644 --- a/src/ru/selfmanga/src/eu/kanade/tachiyomi/extension/ru/selfmanga/Selfmanga.kt +++ b/src/ru/selfmanga/src/eu/kanade/tachiyomi/extension/ru/selfmanga/Selfmanga.kt @@ -106,7 +106,7 @@ class Selfmanga : ParsedHttpSource() { val manga = SManga.create() manga.title = document.select("h1.names .name").text() manga.author = infoElement.select("span.elem_author").first()?.text() - manga.genre = infoElement.select("span.elem_genre").text().replace(" ,", ",") + manga.genre = infoElement.select("span.elem_genre").text().split(",").joinToString { it.trim() } manga.description = document.select("div#tab-description .manga-description").text() manga.status = parseStatus(infoElement.html()) manga.thumbnail_url = infoElement.select("img").attr("data-full") @@ -120,7 +120,7 @@ class Selfmanga : ParsedHttpSource() { else -> SManga.UNKNOWN } - override fun chapterListSelector() = "div.chapters-link tbody tr" + override fun chapterListSelector() = "div.chapters-link > table > tbody > tr:has(td > a):has(td.date:not(.text-info))" override fun chapterFromElement(element: Element): SChapter { val urlElement = element.select("a").first() @@ -137,7 +137,7 @@ class Selfmanga : ParsedHttpSource() { chapter.chapter_number = chapterInf.attr("data-num").toFloat() / 10 - chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let { + chapter.date_upload = element.select("td.d-none").last()?.text()?.let { try { SimpleDateFormat("dd/MM/yy", Locale.US).parse(it)?.time ?: 0L } catch (e: ParseException) {