From 71e7c34dd7fcbc86ea83e0da4bc1dcf0dfa574d9 Mon Sep 17 00:00:00 2001 From: mr-brune <49653622+mr-brune@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:01:10 +0200 Subject: [PATCH] hentaifantasy: Thumbnail support (#4919) * thumnail support * change version --- src/it/hentaifantasy/build.gradle | 2 +- .../extension/it/hentaifantasy/HentaiFantasy.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/it/hentaifantasy/build.gradle b/src/it/hentaifantasy/build.gradle index 152797304..11a299514 100644 --- a/src/it/hentaifantasy/build.gradle +++ b/src/it/hentaifantasy/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'HentaiFantasy' extClass = '.HentaiFantasy' - extVersionCode = 4 + extVersionCode = 5 isNsfw = true } diff --git a/src/it/hentaifantasy/src/eu/kanade/tachiyomi/extension/it/hentaifantasy/HentaiFantasy.kt b/src/it/hentaifantasy/src/eu/kanade/tachiyomi/extension/it/hentaifantasy/HentaiFantasy.kt index 3bc30eb40..41a5a9007 100644 --- a/src/it/hentaifantasy/src/eu/kanade/tachiyomi/extension/it/hentaifantasy/HentaiFantasy.kt +++ b/src/it/hentaifantasy/src/eu/kanade/tachiyomi/extension/it/hentaifantasy/HentaiFantasy.kt @@ -40,15 +40,18 @@ class HentaiFantasy : ParsedHttpSource() { } } - override fun popularMangaSelector() = "div.list > div.group > div.title > a" + override fun popularMangaSelector() = "div.group" override fun popularMangaRequest(page: Int) = GET("$baseUrl/most_downloaded/$page/", headers) override fun popularMangaFromElement(element: Element): SManga { val manga = SManga.create() - manga.setUrlWithoutDomain(element.attr("href")) - manga.title = element.text().trim() + + manga.setUrlWithoutDomain(element.selectFirst("div.title a")!!.attr("href")) + manga.title = element.selectFirst("div.title a")!!.attr("title") + manga.thumbnail_url = element.selectFirst("img.preview")?.attr("src") + return manga }