Mangakawaii - tweak chapter_number (#3041)

This commit is contained in:
Mike 2020-05-06 18:58:45 -04:00 committed by GitHub
parent 549af8b808
commit c6855db5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Mangakawaii'
pkgNameSuffix = 'fr.mangakawaii'
extClass = '.MangaKawaii'
extVersionCode = 8
extVersionCode = 9
libVersion = '1.2'
}

View File

@ -69,7 +69,7 @@ class MangaKawaii : ParsedHttpSource() {
val chapter = SChapter.create()
chapter.url = element.select("a.list-item__title").attr("href")
chapter.name = element.select("a.list-item__title").text().trim()
chapter.chapter_number = element.select("a.list-item__title").text().substringAfter("Chapitre").replace(",", ".").trim().toFloat()
chapter.chapter_number = element.select("a.list-item__title").text().substringAfter("Chapitre").replace(Regex("""[,-]"""), ".").trim().toFloatOrNull() ?: 0F
chapter.date_upload = parseDate(element.select("div.chapter-item__date").text())
return chapter
}