Update date selector and chapter number recognition for readmanga/mintmanga (#343)

Update date selector and chapter number recognition for readmanga/mintmanga
This commit is contained in:
Taumer 2018-06-04 14:55:20 +03:00 committed by Carlos
parent 2536e8f8aa
commit 8d2ecf9cbd
4 changed files with 12 additions and 12 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Mintmanga' appName = 'Tachiyomi: Mintmanga'
pkgNameSuffix = "ru.mintmanga" pkgNameSuffix = "ru.mintmanga"
extClass = '.Mintmanga' extClass = '.Mintmanga'
extVersionCode = 4 extVersionCode = 5
extVersionSuffix = 4 extVersionSuffix = 5
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -95,16 +95,16 @@ class Mintmanga : ParsedHttpSource() {
} else { } else {
chapter.name = urlText chapter.name = urlText
} }
chapter.date_upload = element.select("td:eq(1)").first()?.text()?.let { chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
} ?: 0 } ?: 0
return chapter return chapter
} }
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("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""")
val extra = Regex("""\s([0-9]+\sЭкстра)\s*""") val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""")
val single = Regex("""\sСингл\s*""") val single = Regex("""\s*Сингл\s*""")
when { when {
basic.containsMatchIn(chapter.name) -> { basic.containsMatchIn(chapter.name) -> {
basic.find(chapter.name)?.let { basic.find(chapter.name)?.let {

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Readmanga' appName = 'Tachiyomi: Readmanga'
pkgNameSuffix = "ru.readmanga" pkgNameSuffix = "ru.readmanga"
extClass = '.Readmanga' extClass = '.Readmanga'
extVersionCode = 4 extVersionCode = 5
extVersionSuffix = 4 extVersionSuffix = 5
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -95,16 +95,16 @@ class Readmanga : ParsedHttpSource() {
} else { } else {
chapter.name = urlText chapter.name = urlText
} }
chapter.date_upload = element.select("td:eq(1)").first()?.text()?.let { chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
} ?: 0 } ?: 0
return chapter return chapter
} }
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("""\s*([0-9]+)(\s-\s)([0-9]+)\s*""")
val extra = Regex("""\s([0-9]+\sЭкстра)\s*""") val extra = Regex("""\s*([0-9]+\sЭкстра)\s*""")
val single = Regex("""\sСингл\s*""") val single = Regex("""\s*Сингл\s*""")
when { when {
basic.containsMatchIn(chapter.name) -> { basic.containsMatchIn(chapter.name) -> {
basic.find(chapter.name)?.let { basic.find(chapter.name)?.let {