[RU]LibGroup hide all chapters have price (#13690)

* [RU]LibGroup hide all chapters have price

* fix covers
This commit is contained in:
Eshlender 2022-10-03 16:48:38 +05:00 committed by GitHub
parent 3a13bc8408
commit 0fe977a99b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ class LibGenerator : ThemeSourceGenerator {
override val themeClass = "LibGroup"
override val baseVersionCode: Int = 9
override val baseVersionCode: Int = 10
override val sources = listOf(
SingleLang("MangaLib", "https://mangalib.me", "ru", overrideVersionCode = 74),

View File

@ -186,7 +186,7 @@ abstract class LibGroup(
isEng.equals("eng") && el.jsonObject["eng_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["eng_name"]!!.jsonPrimitive.content
else -> el.jsonObject["name"]!!.jsonPrimitive.content
}
thumbnail_url = if (el.jsonObject["covers"] != null) baseUrl + el.jsonObject["covers"]!!.jsonObject["default"]!!.jsonPrimitive.content
thumbnail_url = if (el.jsonObject["coverImage"] != null) baseUrl + el.jsonObject["coverImage"]!!.jsonPrimitive.content
else baseUrl + "/uploads/cover/" + slug + "/cover/" + el.jsonObject["cover"]!!.jsonPrimitive.content + "_250x350.jpg"
url = "/$slug"
}
@ -313,7 +313,7 @@ abstract class LibGroup(
sortChaptersByTranslator(sortingList, chaptersList, slug, branches)
} else {
chaptersList
?.filter { it.jsonObject["status"]?.jsonPrimitive?.intOrNull != 2 }
?.filter { it.jsonObject["status"]?.jsonPrimitive?.intOrNull != 2 && it.jsonObject["price"]?.jsonPrimitive?.intOrNull == 0 }
?.map { chapterFromElement(it, sortingList, slug, null, null, teams, chaptersList) }
}