diff --git a/src/en/timelessleaf/build.gradle b/src/en/timelessleaf/build.gradle index a92242e6a..07a6b35ec 100644 --- a/src/en/timelessleaf/build.gradle +++ b/src/en/timelessleaf/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'TimelessLeaf' pkgNameSuffix = 'en.timelessleaf' extClass = '.TimelessLeaf' - extVersionCode = 1 + extVersionCode = 2 libVersion = '1.2' } diff --git a/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt b/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt index de8aac2c6..7de6bc033 100644 --- a/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt +++ b/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt @@ -28,12 +28,10 @@ class TimelessLeaf : HttpSource() { override val supportsLatest: Boolean = false - val mangasPageUrl = baseUrl + "/manga/" - // popular manga override fun popularMangaRequest(page: Int): Request { - return GET(mangasPageUrl) + return GET("$baseUrl/manga/") } override fun popularMangaParse(response: Response): MangasPage { @@ -62,7 +60,7 @@ class TimelessLeaf : HttpSource() { menuLinks.forEach { el -> val title = el.text() // ignore duplicates - if (titleList.filter { str -> str.startsWith(title, ignoreCase = true) }.isEmpty()) + if (titleList.none { str -> str.startsWith(title, ignoreCase = true) }) add(Pair(title, el.attr("href"))) } }.sortedBy { pair -> pair.first } @@ -107,9 +105,14 @@ class TimelessLeaf : HttpSource() { // page list override fun pageListParse(response: Response): List { - return response.asJsoup().select(".site-main article .gallery-item img").mapIndexed { index, el -> - Page(index, "", el.attr("abs:src")) - } + return response.asJsoup() + .let { document -> + document.select(".site-main article .gallery-item img") + .let { if (it.isNullOrEmpty()) document.select("div.entry-content img") else it } + } + .mapIndexed { index, el -> + Page(index, "", el.attr("abs:src")) + } } // search manga, implementing a local search