[Feature] TuMangaOnline - Choose Scans (#1673)
[Feature] TuMangaOnline - Choose Scans
This commit is contained in:
parent
1d5df79964
commit
bd92939583
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: TuMangaOnline'
|
appName = 'Tachiyomi: TuMangaOnline'
|
||||||
pkgNameSuffix = 'es.tumangaonline'
|
pkgNameSuffix = 'es.tumangaonline'
|
||||||
extClass = '.TuMangaOnline'
|
extClass = '.TuMangaOnline'
|
||||||
extVersionCode = 9
|
extVersionCode = 10
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,13 @@ class TuMangaOnline : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regular list of chapters
|
// Regular list of chapters
|
||||||
return document.select(regularChapterListSelector()).map { regularChapterFromElement(it) }
|
val chapters = mutableListOf<SChapter>()
|
||||||
|
document.select(regularChapterListSelector()).forEach { chapelement ->
|
||||||
|
val chapternumber = chapelement.select("a.btn-collapse").text().substringBefore(":").substringAfter("Capítulo").trim().toFloat()
|
||||||
|
val chaptername = chapelement.select("div.col-10.text-truncate").text()
|
||||||
|
chapelement.select("ul.chapter-list > li").forEach { chapters.add(regularChapterFromElement(it, chaptername, chapternumber)) }
|
||||||
|
}
|
||||||
|
return chapters
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
|
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
|
||||||
|
@ -208,9 +214,10 @@ class TuMangaOnline : ParsedHttpSource() {
|
||||||
|
|
||||||
private fun regularChapterListSelector() = "div.chapters > ul.list-group li.p-0.list-group-item"
|
private fun regularChapterListSelector() = "div.chapters > ul.list-group li.p-0.list-group-item"
|
||||||
|
|
||||||
private fun regularChapterFromElement(element: Element) = SChapter.create().apply {
|
private fun regularChapterFromElement(element: Element, chname: String, number: Float) = SChapter.create().apply {
|
||||||
setUrlWithoutDomain(element.select("div.row > .text-right > a").attr("href"))
|
setUrlWithoutDomain(element.select("div.row > .text-right > a").attr("href"))
|
||||||
name = element.select("div.col-10.text-truncate").text()
|
name = chname
|
||||||
|
chapter_number = number
|
||||||
scanlator = element.select("div.col-md-6.text-truncate")?.text()
|
scanlator = element.select("div.col-md-6.text-truncate")?.text()
|
||||||
date_upload = element.select("span.badge.badge-primary.p-2").first()?.text()?.let { parseChapterDate(it) } ?: 0
|
date_upload = element.select("span.badge.badge-primary.p-2").first()?.text()?.let { parseChapterDate(it) } ?: 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue