From 8ab4ab5ad5459bd8af4be219da25f19e58fb2ea2 Mon Sep 17 00:00:00 2001 From: ddmgy Date: Mon, 19 Feb 2018 09:08:07 -0500 Subject: [PATCH] Fix empty lists on MerakiScans. (#208) * Update manga selectors. * Fix manga details. * Update version code. --- src/en/merakiscans/build.gradle | 4 ++-- .../extension/en/merakiscans/MerakiScans.kt | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/en/merakiscans/build.gradle b/src/en/merakiscans/build.gradle index 2222b3b38..11bd755ac 100644 --- a/src/en/merakiscans/build.gradle +++ b/src/en/merakiscans/build.gradle @@ -5,9 +5,9 @@ ext { appName = 'Tachiyomi: MerakiScans' pkgNameSuffix = 'en.merakiscans' extClass = '.MerakiScans' - extVersionCode = 1 + extVersionCode = 2 extVersionSuffix = 1 - libVersion = '1.0' + libVersion = '1.2' } apply from: "$rootDir/common.gradle" \ No newline at end of file diff --git a/src/en/merakiscans/src/eu/kanade/tachiyomi/extension/en/merakiscans/MerakiScans.kt b/src/en/merakiscans/src/eu/kanade/tachiyomi/extension/en/merakiscans/MerakiScans.kt index 5b882b094..c03e9f986 100644 --- a/src/en/merakiscans/src/eu/kanade/tachiyomi/extension/en/merakiscans/MerakiScans.kt +++ b/src/en/merakiscans/src/eu/kanade/tachiyomi/extension/en/merakiscans/MerakiScans.kt @@ -32,7 +32,7 @@ class MerakiScans : ParsedHttpSource() { } } - override fun popularMangaSelector() = "div.mng_lst > div.nde > div.det > a" + override fun popularMangaSelector() = "div.mng_lst > div.row > div.item > div.det > a" override fun latestUpdatesSelector() = popularMangaSelector() @@ -49,7 +49,7 @@ class MerakiScans : ParsedHttpSource() { override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element) - override fun popularMangaNextPageSelector() = "div.next > a.gbutton:contains(Next ยป)" + override fun popularMangaNextPageSelector() = null override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() @@ -70,13 +70,17 @@ class MerakiScans : ParsedHttpSource() { override fun mangaDetailsParse(document: Document) = SManga.create().apply { val infoElement = document.select("div.mng_det > div.mng_ifo") - infoElement.select("div.det > p").forEachIndexed { i, el -> + infoElement.select("div > p").forEachIndexed { i, el -> if (i == 0) { description = el.text().trim() } when (el.select("b").text().trim()) { - "Author" -> author = el.select("a").text()?.trim() - "Artist" -> artist = el.select("a").text()?.trim() + "Author" -> author = el.select("a").map { + it.text().trim() + }.joinToString(", ") + "Artist" -> artist = el.select("a").map { + it.text().trim() + }.joinToString(", ") "Category" -> genre = el.select("a").map { it.text().trim() }.joinToString(", ")