[RU]Readmanga & Mintmanga add Age tags (#7234)

This commit is contained in:
Eugene 2021-05-26 19:42:42 +05:00 committed by GitHub
parent 8d484639fd
commit 0a842f6152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 11 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mintmanga'
pkgNameSuffix = 'ru.mintmanga'
extClass = '.Mintmanga'
extVersionCode = 29
extVersionCode = 30
libVersion = '1.2'
}

View File

@ -143,6 +143,12 @@ class Mintmanga : ParsedHttpSource() {
ratingValue > 0.5 -> "✬☆☆☆☆"
else -> "☆☆☆☆☆"
}
val rawAgeValue = infoElement.select(".elem_limitation .element-link").first()?.text()
val rawAgeStop = when (rawAgeValue) {
"NC-17" -> "18+"
"R18+" -> "18+"
else -> "16+"
}
val manga = SManga.create()
var authorElement = infoElement.select("span.elem_author").first()?.text()
if (authorElement == null) {
@ -151,7 +157,7 @@ class Mintmanga : ParsedHttpSource() {
manga.title = infoElement.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 = infoElement.select("span.elem_genre").text().split(",").plusElement(category).plusElement(rawAgeStop).joinToString { it.trim() }
var altName = ""
if (infoElement.select(".another-names").isNotEmpty()) {
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
@ -361,9 +367,9 @@ class Mintmanga : ParsedHttpSource() {
)
private fun getAgeList() = listOf(
Genre("NC-17", "el_3969"),
Genre("R", "el_3968"),
Genre("R18+", "el_3990")
Genre("R(16+)", "el_3968"),
Genre("NC-17(18+)", "el_3969"),
Genre("R18+(18+)", "el_3990")
)
private fun getCategoryList() = listOf(

View File

@ -5,7 +5,7 @@ ext {
extName = 'Readmanga'
pkgNameSuffix = 'ru.readmanga'
extClass = '.Readmanga'
extVersionCode = 28
extVersionCode = 29
libVersion = '1.2'
}

View File

@ -144,7 +144,12 @@ class Readmanga : ParsedHttpSource() {
ratingValue > 0.5 -> "✬☆☆☆☆"
else -> "☆☆☆☆☆"
}
val rawAgeValue = infoElement.select(".elem_limitation .element-link").first()?.text()
val rawAgeStop = when (rawAgeValue) {
"PG" -> "16+"
"PG-13" -> "12+"
else -> "0+"
}
val manga = SManga.create()
var authorElement = infoElement.select("span.elem_author").first()?.text()
if (authorElement == null) {
@ -153,7 +158,7 @@ class Readmanga : ParsedHttpSource() {
manga.title = infoElement.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 = infoElement.select("span.elem_genre").text().split(",").plusElement(category).plusElement(rawAgeStop).joinToString { it.trim() }
var altName = ""
if (infoElement.select(".another-names").isNotEmpty()) {
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
@ -366,9 +371,9 @@ class Readmanga : ParsedHttpSource() {
)
private fun getAgeList() = listOf(
Genre("G", "el_6180"),
Genre("PG", "el_6179"),
Genre("PG-13", "el_6181")
Genre("G(0+)", "el_6180"),
Genre("PG-13(12+)", "el_6181"),
Genre("PG(16+)", "el_6179")
)
private fun getCategoryList() = listOf(