Hiveworks - Add Chapter Filtering (#2463)
* Add chapter filtering - Better supports Check Please Comic and others if needed * Use better code
This commit is contained in:
parent
bc49af1d14
commit
b4e563a135
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Hiveworks Comics'
|
appName = 'Tachiyomi: Hiveworks Comics'
|
||||||
pkgNameSuffix = 'en.hiveworks'
|
pkgNameSuffix = 'en.hiveworks'
|
||||||
extClass = '.Hiveworks'
|
extClass = '.Hiveworks'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,7 @@ class Hiveworks : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
|
val url = response.request().url().toString()
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
val baseUrl = document.select("div script").html().substringAfter("href='").substringBefore("'")
|
val baseUrl = document.select("div script").html().substringAfter("href='").substringBefore("'")
|
||||||
val elements = document.select(chapterListSelector())
|
val elements = document.select(chapterListSelector())
|
||||||
|
@ -192,6 +193,9 @@ class Hiveworks : ParsedHttpSource() {
|
||||||
for (i in 1 until elements.size) {
|
for (i in 1 until elements.size) {
|
||||||
chapters.add(createChapter(elements[i], baseUrl))
|
chapters.add(createChapter(elements[i], baseUrl))
|
||||||
}
|
}
|
||||||
|
when {
|
||||||
|
"checkpleasecomic" in url -> chapters.retainAll { it.name.endsWith("01") || it.name.endsWith(" 1") }
|
||||||
|
}
|
||||||
chapters.reverse()
|
chapters.reverse()
|
||||||
return chapters
|
return chapters
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue