[RU]Remanga, Mangalib. Fix "single pixel" filter page and hide empty altname (#7502)

* [RU]Remanga, Mangalib. Fix "single pixel" filter page and hide empty altname

* statusLICENSED
This commit is contained in:
Eugene 2021-06-07 03:11:13 +05:00 committed by GitHub
parent dc6443ac40
commit ea0ae4e3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga'
extVersionCode = 50
extVersionCode = 51
libVersion = '1.2'
}

View File

@ -210,7 +210,12 @@ class LibManga : ConfigurableSource, HttpSource() {
else -> SManga.UNKNOWN
}
manga.genre = genres.plusElement(category).plusElement(rawAgeStop).joinToString { it.trim() }
manga.description = document.select(".media-name__main").text() + "\n" + ratingStar + " " + ratingValue + " (голосов: " + ratingVotes + ")" + "\nАльтернативные названия:\n" + document.select(".media-info-list__item_alt-names .media-info-list__value div").map { it.text() }.joinToString(" / ") + "\n\n" + document.select(".media-description__text").text()
val altSelector = document.select(".media-info-list__item_alt-names .media-info-list__value div")
var altName = ""
if (altSelector.isNotEmpty()) {
altName = "Альтернативные названия:\n" + altSelector.map { it.text() }.joinToString(" / ") + "\n\n"
}
manga.description = document.select(".media-name__main").text() + "\n" + ratingStar + " " + ratingValue + " (голосов: " + ratingVotes + ")\n" + altName + document.select(".media-description__text").text()
return manga
}

View File

@ -5,7 +5,7 @@ ext {
extName = 'Remanga'
pkgNameSuffix = 'ru.remanga'
extClass = '.Remanga'
extVersionCode = 27
extVersionCode = 28
libVersion = '1.2'
}

View File

@ -195,6 +195,7 @@ class Remanga : ConfigurableSource, HttpSource() {
return when (status) {
0 -> SManga.COMPLETED
1 -> SManga.ONGOING
5 -> SManga.LICENSED
else -> SManga.UNKNOWN
}
}
@ -234,7 +235,11 @@ class Remanga : ConfigurableSource, HttpSource() {
title = en_name
url = "/api/titles/$dir/"
thumbnail_url = "$baseUrl/${img.high}"
this.description = rus_name + "\n" + ratingStar + " " + ratingValue + " (голосов: " + count_rating + ")" + "\nАльтернативные названия:\n" + another_name + "\n\n" + Jsoup.parse(o.description).text()
var altName = ""
if (another_name.isNotEmpty()) {
altName = "Альтернативные названия:\n" + another_name + "\n\n"
}
this.description = rus_name + "\n" + ratingStar + " " + ratingValue + " (голосов: " + count_rating + ")\n" + altName + Jsoup.parse(o.description).text()
genre = (genres + parseType(type)).joinToString { it.name } + ", " + parseAge(age_limit)
status = parseStatus(o.status.id)
}
@ -346,7 +351,7 @@ class Remanga : ConfigurableSource, HttpSource() {
val page = gson.fromJson<SeriesWrapperDto<PaidPageDto>>(body)
val result = mutableListOf<Page>()
page.content.pages.forEach {
it.filter { page -> page.height > 1 }.forEach { page ->
it.filter { page -> page.height > 10 }.forEach { page ->
result.add(Page(result.size, "", page.link))
}
}