Fix: page ordering & broken chapter loading (#16959)
* fix: Chapter preview broke loading of all other chapters * fix: Page ordering * updated version * applied PR suggestions
This commit is contained in:
parent
dbb4f6a0e0
commit
c4b08d04e3
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'aurora'
|
extName = 'aurora'
|
||||||
pkgNameSuffix = 'en.aurora'
|
pkgNameSuffix = 'en.aurora'
|
||||||
extClass = '.Aurora'
|
extClass = '.Aurora'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Aurora : HttpSource() {
|
||||||
override fun chapterListParse(response: Response): List<SChapter> = throw Exception("Not used")
|
override fun chapterListParse(response: Response): List<SChapter> = throw Exception("Not used")
|
||||||
|
|
||||||
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
||||||
return Observable.just(fetchChapterListTR(baseUrl + manga.url, mutableListOf()))
|
return Observable.just(fetchChapterListTR(baseUrl + manga.url, mutableListOf()).reversed())
|
||||||
}
|
}
|
||||||
|
|
||||||
private tailrec fun fetchChapterListTR(
|
private tailrec fun fetchChapterListTR(
|
||||||
|
@ -144,8 +144,8 @@ class Aurora : HttpSource() {
|
||||||
val chapterArchiveUrl = "$baseUrl/archive/"
|
val chapterArchiveUrl = "$baseUrl/archive/"
|
||||||
|
|
||||||
val chapterOverviewDoc = client.newCall(GET(chapterArchiveUrl, headers)).execute().asJsoup()
|
val chapterOverviewDoc = client.newCall(GET(chapterArchiveUrl, headers)).execute().asJsoup()
|
||||||
val chapterBlockElements = chapterOverviewDoc.select(".wp-block-image")
|
val chapterBlockElements = chapterOverviewDoc.select(".wp-block-image:has(a)")
|
||||||
val mangasFromChapters = chapterBlockElements
|
val mangasFromChapters: List<SManga> = chapterBlockElements
|
||||||
.mapIndexed { chapterIndex, chapter ->
|
.mapIndexed { chapterIndex, chapter ->
|
||||||
val chapterOverviewLink = chapter.selectFirst("a")!!
|
val chapterOverviewLink = chapter.selectFirst("a")!!
|
||||||
val chapterOverviewUrl = chapterOverviewLink.attr("href")
|
val chapterOverviewUrl = chapterOverviewLink.attr("href")
|
||||||
|
|
Loading…
Reference in New Issue