[RU]Readmanga & Mintmanga add Age tags (#7234)
This commit is contained in:
parent
8d484639fd
commit
0a842f6152
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Mintmanga'
|
extName = 'Mintmanga'
|
||||||
pkgNameSuffix = 'ru.mintmanga'
|
pkgNameSuffix = 'ru.mintmanga'
|
||||||
extClass = '.Mintmanga'
|
extClass = '.Mintmanga'
|
||||||
extVersionCode = 29
|
extVersionCode = 30
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,12 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
ratingValue > 0.5 -> "✬☆☆☆☆"
|
ratingValue > 0.5 -> "✬☆☆☆☆"
|
||||||
else -> "☆☆☆☆☆"
|
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()
|
val manga = SManga.create()
|
||||||
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
||||||
if (authorElement == null) {
|
if (authorElement == null) {
|
||||||
|
@ -151,7 +157,7 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
manga.title = infoElement.select("h1.names .name").text()
|
manga.title = infoElement.select("h1.names .name").text()
|
||||||
manga.author = authorElement
|
manga.author = authorElement
|
||||||
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
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 = ""
|
var altName = ""
|
||||||
if (infoElement.select(".another-names").isNotEmpty()) {
|
if (infoElement.select(".another-names").isNotEmpty()) {
|
||||||
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
|
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
|
||||||
|
@ -361,9 +367,9 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun getAgeList() = listOf(
|
private fun getAgeList() = listOf(
|
||||||
Genre("NC-17", "el_3969"),
|
Genre("R(16+)", "el_3968"),
|
||||||
Genre("R", "el_3968"),
|
Genre("NC-17(18+)", "el_3969"),
|
||||||
Genre("R18+", "el_3990")
|
Genre("R18+(18+)", "el_3990")
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun getCategoryList() = listOf(
|
private fun getCategoryList() = listOf(
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Readmanga'
|
extName = 'Readmanga'
|
||||||
pkgNameSuffix = 'ru.readmanga'
|
pkgNameSuffix = 'ru.readmanga'
|
||||||
extClass = '.Readmanga'
|
extClass = '.Readmanga'
|
||||||
extVersionCode = 28
|
extVersionCode = 29
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,12 @@ class Readmanga : ParsedHttpSource() {
|
||||||
ratingValue > 0.5 -> "✬☆☆☆☆"
|
ratingValue > 0.5 -> "✬☆☆☆☆"
|
||||||
else -> "☆☆☆☆☆"
|
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()
|
val manga = SManga.create()
|
||||||
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
||||||
if (authorElement == null) {
|
if (authorElement == null) {
|
||||||
|
@ -153,7 +158,7 @@ class Readmanga : ParsedHttpSource() {
|
||||||
manga.title = infoElement.select("h1.names .name").text()
|
manga.title = infoElement.select("h1.names .name").text()
|
||||||
manga.author = authorElement
|
manga.author = authorElement
|
||||||
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
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 = ""
|
var altName = ""
|
||||||
if (infoElement.select(".another-names").isNotEmpty()) {
|
if (infoElement.select(".another-names").isNotEmpty()) {
|
||||||
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
|
altName = "Альтернативные названия:\n" + infoElement.select(".another-names").text() + "\n\n"
|
||||||
|
@ -366,9 +371,9 @@ class Readmanga : ParsedHttpSource() {
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun getAgeList() = listOf(
|
private fun getAgeList() = listOf(
|
||||||
Genre("G", "el_6180"),
|
Genre("G(0+)", "el_6180"),
|
||||||
Genre("PG", "el_6179"),
|
Genre("PG-13(12+)", "el_6181"),
|
||||||
Genre("PG-13", "el_6181")
|
Genre("PG(16+)", "el_6179")
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun getCategoryList() = listOf(
|
private fun getCategoryList() = listOf(
|
||||||
|
|
Loading…
Reference in New Issue