Fix: MRM Date Parsing Update (#1421)

Fix: MRM Date Parsing Update
This commit is contained in:
happywillow0 2019-08-25 10:33:56 -04:00 committed by Eugene
parent 0ad1dfa9f8
commit 341d1a018e
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MyReadingManga'
pkgNameSuffix = 'all.myreadingmanga'
extClass = '.MyReadingMangaFactory'
extVersionCode = 22
extVersionCode = 23
libVersion = '1.2'
}

View File

@ -130,7 +130,7 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
val document = response.asJsoup()
val chapters = mutableListOf<SChapter>()
val date = parseDate(document.select(".entry-time").attr("datetime").substringBefore("T"))
val date = parseDate(document.select(".entry-time").text())
val mangaUrl = document.baseUri()
val chfirstname = document.select(".chapter-class a[href*=$mangaUrl]")?.first()?.text()?.ifEmpty { "Ch. 1" }?.capitalize() ?:"Ch. 1"
//create first chapter since its on main manga page
@ -151,7 +151,7 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
}
private fun parseDate(date: String): Long {
return SimpleDateFormat("yyyy-MM-dd").parse(date).time
return SimpleDateFormat("MMM dd, yyyy").parse(date).time
}
private fun createChapter(pageNumber: String, mangaUrl: String, date: Long, chname: String): SChapter {