mangadex fixes

adjusted paging of chapters
changed url to .org (#228)
This commit is contained in:
Carlos 2018-03-03 08:14:05 -05:00 committed by GitHub
parent c6b8181527
commit 19d1278828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: MangaDex' appName = 'Tachiyomi: MangaDex'
pkgNameSuffix = "all.mangadex" pkgNameSuffix = "all.mangadex"
extClass = '.MangadexFactory' extClass = '.MangadexFactory'
extVersionCode = 9 extVersionCode = 10
extVersionSuffix = 9 extVersionSuffix = 10
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -21,7 +21,7 @@ open class Mangadex(override val lang: String, private val internalLang: String,
override val name = "MangaDex" override val name = "MangaDex"
override val baseUrl = "https://mangadex.com" override val baseUrl = "https://mangadex.org"
override val supportsLatest = true override val supportsLatest = true
@ -185,7 +185,7 @@ open class Mangadex(override val lang: String, private val internalLang: String,
private fun pagedChapterListRequest(url: String, page: Int): Request { private fun pagedChapterListRequest(url: String, page: Int): Request {
var pageUrl = url + "/" + ((page * 100)) var pageUrl = url + "/" + page
return GET(pageUrl, headers) return GET(pageUrl, headers)
} }
@ -200,7 +200,7 @@ open class Mangadex(override val lang: String, private val internalLang: String,
override fun chapterListParse(response: Response): List<SChapter> { override fun chapterListParse(response: Response): List<SChapter> {
var document = response.asJsoup() var document = response.asJsoup()
val baseUri = baseUrl + document.select("li.paging a").first()?.attr("href")?.substringBeforeLast("/") val baseUri = baseUrl + document.select("li.paging a").first()?.attr("href")?.substringBeforeLast("/")
var page = 1 var page = 2
val now = Date().time val now = Date().time
val chapters = mutableListOf<SChapter>() val chapters = mutableListOf<SChapter>()
do { do {