fix megatokyo image selector & chapter order (#9024)
* fix megatokyo image selector * Update build.gradle * also fix the reversed chapter order * whoops
This commit is contained in:
parent
2a3d88cea0
commit
27a785e15e
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Megatokyo'
|
||||
pkgNameSuffix = 'en.megatokyo'
|
||||
extClass = '.Megatokyo'
|
||||
extVersionCode = 1
|
||||
extVersionCode = 2
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.source.model.SManga
|
|||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import rx.Observable
|
||||
|
@ -49,6 +50,10 @@ class Megatokyo : ParsedHttpSource() {
|
|||
override fun fetchMangaDetails(manga: SManga): Observable<SManga> = fetchPopularManga(1)
|
||||
.map { it.mangas.first().apply { initialized = true } }
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
return super.chapterListParse(response).reversed()
|
||||
}
|
||||
|
||||
override fun chapterListSelector() =
|
||||
"div.content h2:contains(Comics by Date) + div ul li a[name]"
|
||||
|
||||
|
@ -62,7 +67,7 @@ class Megatokyo : ParsedHttpSource() {
|
|||
}
|
||||
|
||||
override fun pageListParse(document: Document) =
|
||||
document.select("#strip-bl a img")
|
||||
document.select("#strip img")
|
||||
.mapIndexed { i, element ->
|
||||
Page(i, "", "https://megatokyo.com/" + element.attr("src"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue