NHentai - fix pages (#3455)
This commit is contained in:
parent
af807266b8
commit
7a0b545316
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: NHentai'
|
appName = 'Tachiyomi: NHentai'
|
||||||
pkgNameSuffix = 'all.nhentai'
|
pkgNameSuffix = 'all.nhentai'
|
||||||
extClass = '.NHFactory'
|
extClass = '.NHFactory'
|
||||||
extVersionCode = 19
|
extVersionCode = 20
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -224,23 +224,12 @@ open class NHentai(
|
||||||
|
|
||||||
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
|
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter) = GET("$baseUrl${chapter.url}", headers)
|
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pageElements = document.select("#thumbnail-container > div")
|
return document.select("div.thumbs a > img").mapIndexed { i, img ->
|
||||||
val pageList = mutableListOf<Page>()
|
Page(i, "", img.attr("abs:data-src").replace("t.nh", "i.nh").replace("t.", "."))
|
||||||
|
|
||||||
pageElements.forEach {
|
|
||||||
Page(pageList.size).run {
|
|
||||||
this.imageUrl = it.select("a > img").attr("data-src").replace("t.nh", "i.nh").replace("t.", ".")
|
|
||||||
|
|
||||||
pageList.add(pageList.size, this)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pageList
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getFilterList(): FilterList = FilterList(
|
override fun getFilterList(): FilterList = FilterList(
|
||||||
SortFilter(),
|
SortFilter(),
|
||||||
Filter.Header("Sort is ignored if favorites only"),
|
Filter.Header("Sort is ignored if favorites only"),
|
||||||
|
|
Loading…
Reference in New Issue