Mangahasu (#507)

Mangahasu
This commit is contained in:
Pavka 2018-09-22 21:02:57 +03:00 committed by Carlos
parent 62269d8996
commit 66fc182e7a
2 changed files with 4 additions and 5 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Mangahasu' appName = 'Tachiyomi: Mangahasu'
pkgNameSuffix = 'en.mangahasu' pkgNameSuffix = 'en.mangahasu'
extClass = '.Mangahasu' extClass = '.Mangahasu'
extVersionCode = 1 extVersionCode = 2
extVersionSuffix = 1 extVersionSuffix = 2
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -101,12 +101,11 @@ class Mangahasu: ParsedHttpSource() {
} }
override fun prepareNewChapter(chapter: SChapter, manga: SManga) { override fun prepareNewChapter(chapter: SChapter, manga: SManga) {
val basic = Regex("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""") val basic = Regex("""Chapter\s([0-9]+)""")
when { when {
basic.containsMatchIn(chapter.name) -> { basic.containsMatchIn(chapter.name) -> {
basic.find(chapter.name)?.let { basic.find(chapter.name)?.let {
val number = it.groups[3]?.value!! chapter.chapter_number = it.groups[1]?.value!!.toFloat()
chapter.chapter_number = number.toFloat()
} }
} }
} }