[RU]LibGroup fix chapter_number (#17439)

This commit is contained in:
Eshlender 2023-08-09 22:55:44 +05:00 committed by GitHub
parent bb9f90efcd
commit 715c8f1fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -410,7 +410,7 @@ abstract class LibGroup(
chapter.scanlator = if (teams?.size == 1) teams[0].jsonObject["name"]?.jsonPrimitive?.content else if (isScanlatorId.orEmpty().isNotEmpty()) isScanlatorId!![0].jsonObject["name"]?.jsonPrimitive?.content else branches?.let { getScanlatorTeamName(it, chapterItem) } ?: if ((preferences.getBoolean(isScan_USER, false)) || (chaptersList?.distinctBy { it.jsonObject["username"]!!.jsonPrimitive.content }?.size == 1)) chapterItem.jsonObject["username"]!!.jsonPrimitive.content else null
chapter.name = if (nameChapter.isNullOrBlank()) fullNameChapter else "$fullNameChapter - $nameChapter"
chapter.date_upload = simpleDateFormat.parse(chapterItem.jsonObject["chapter_created_at"]!!.jsonPrimitive.content.substringBefore(" "))?.time ?: 0L
chapter.chapter_number = number.toFloat()
chapter.chapter_number = number.toFloatOrNull() ?: -1f
return chapter
}