diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt index 6dabcb168..0b6e808cd 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt @@ -114,7 +114,7 @@ abstract class MangaHub( // search override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - var url = "$baseUrl/search/page/$page".toHttpUrlOrNull()!!.newBuilder() + val url = "$baseUrl/search/page/$page".toHttpUrlOrNull()!!.newBuilder() url.addQueryParameter("q", query) (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> when (filter) { @@ -126,6 +126,7 @@ abstract class MangaHub( val genre = filter.values[filter.state] url.addQueryParameter("genre", genre.key) } + else -> {} } } return GET(url.toString(), headers) @@ -157,7 +158,7 @@ abstract class MangaHub( values.minByOrNull { it.url.length }!! }.values.toList() - val hasNextPage = searchMangaNextPageSelector()?.let { selector -> + val hasNextPage = searchMangaNextPageSelector().let { selector -> document.select(selector).first() } != null @@ -203,9 +204,9 @@ abstract class MangaHub( override fun chapterFromElement(element: Element): SChapter { val chapter = SChapter.create() - chapter.setUrlWithoutDomain(element.select("a[href*='$baseUrl']").attr("href")) + chapter.setUrlWithoutDomain(element.select("a[href*='$baseUrl']").last().attr("href")) - val titleHeader = element.select(".text-secondary").first() + val titleHeader = element.select("._8Qtbo").first() val number = titleHeader.select("._3D1SJ").first().text() val title = titleHeader.select("._2IG5P").first().text() diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHubGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHubGenerator.kt index 1f08b95ca..b3be12bba 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHubGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHubGenerator.kt @@ -9,7 +9,7 @@ class MangaHubGenerator : ThemeSourceGenerator { override val themeClass = "MangaHub" - override val baseVersionCode: Int = 12 + override val baseVersionCode: Int = 13 override val sources = listOf( // SingleLang("1Manga.co", "https://1manga.co", "en", isNsfw = true, className = "OneMangaCo"),