[RU]Manga/Hentailib name correct (#11144)

* [RU]Manga/Hentailib name correct

* option correct
This commit is contained in:
e-shl 2022-03-16 22:17:14 +05:00 committed by GitHub
parent ea2f15ba69
commit 28be79bba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 6 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'HentaiLib'
pkgNameSuffix = 'ru.libhentai'
extClass = '.LibHentai'
extVersionCode = 8
extVersionCode = 9
isNsfw = true
}

View File

@ -170,7 +170,11 @@ class LibHentai : ConfigurableSource, HttpSource() {
private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply {
val slug = el.jsonObject["slug"]!!.jsonPrimitive.content
val cover = el.jsonObject["cover"]!!.jsonPrimitive.content
title = if (isEng.equals("rus")) el.jsonObject["rus_name"]!!.jsonPrimitive.content else el.jsonObject["name"]!!.jsonPrimitive.content
title = when {
isEng.equals("rus") && el.jsonObject["rus_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["rus_name"]!!.jsonPrimitive.content
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 = "$COVER_URL/huploads/cover/$slug/cover/${cover}_250x350.jpg"
url = "/$slug"
}
@ -900,7 +904,7 @@ class LibHentai : ConfigurableSource, HttpSource() {
val titleLanguagePref = ListPreference(screen.context).apply {
key = LANGUAGE_PREF
title = LANGUAGE_PREF_Title
entries = arrayOf("Английский (транскрипция)", "Русский")
entries = arrayOf("Английский", "Русский")
entryValues = arrayOf("eng", "rus")
summary = "%s"
setDefaultValue("eng")

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga'
extVersionCode = 64
extVersionCode = 65
}
dependencies {

View File

@ -163,7 +163,11 @@ class LibManga : ConfigurableSource, HttpSource() {
private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply {
val slug = el.jsonObject["slug"]!!.jsonPrimitive.content
val cover = el.jsonObject["cover"]!!.jsonPrimitive.content
title = if (isEng.equals("rus")) el.jsonObject["rus_name"]!!.jsonPrimitive.content else el.jsonObject["name"]!!.jsonPrimitive.content
title = when {
isEng.equals("rus") && el.jsonObject["rus_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["rus_name"]!!.jsonPrimitive.content
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 = "$COVER_URL/uploads/cover/$slug/cover/${cover}_250x350.jpg"
url = "/$slug"
}
@ -860,7 +864,7 @@ class LibManga : ConfigurableSource, HttpSource() {
val titleLanguagePref = ListPreference(screen.context).apply {
key = LANGUAGE_PREF
title = LANGUAGE_PREF_Title
entries = arrayOf("Английский (транскрипция)", "Русский")
entries = arrayOf("Английский", "Русский")
entryValues = arrayOf("eng", "rus")
summary = "%s"
setDefaultValue("eng")