From ce453df6c3741e7388990a804073de4d6dbbcbbd Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Fri, 24 Apr 2020 22:25:15 -0400 Subject: [PATCH] Madara - fix Hiperdex, add 2 tr sources (#2811) --- src/all/madara/build.gradle | 2 +- .../kanade/tachiyomi/extension/all/madara/Madara.kt | 4 +++- .../tachiyomi/extension/all/madara/MadaraFactory.kt | 12 ++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/all/madara/build.gradle b/src/all/madara/build.gradle index c84090146..c6f172d8b 100644 --- a/src/all/madara/build.gradle +++ b/src/all/madara/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: Madara (multiple sources)' pkgNameSuffix = "all.madara" extClass = '.MadaraFactory' - extVersionCode = 74 + extVersionCode = 75 libVersion = '1.2' } diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt index a2aef0af2..55392ee8a 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/Madara.kt @@ -389,11 +389,13 @@ abstract class Madara( override fun chapterListSelector() = "li.wp-manga-chapter" + open val chapterUrlSelector = "a" + override fun chapterFromElement(element: Element): SChapter { val chapter = SChapter.create() with(element) { - select("a").first()?.let { urlElement -> + select(chapterUrlSelector).first()?.let { urlElement -> chapter.url = urlElement.attr("abs:href").let { it.substringBefore("?style=paged") + if (!it.endsWith("?style=list")) "?style=list" else "" } diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt index 9d1244bd1..51972c87b 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt @@ -103,7 +103,9 @@ class MadaraFactory : SourceFactory { YokaiJump(), YoManga(), ZinManga(), - ZManga() + ZManga(), + MangaGecesi(), + MangaWT() ) } @@ -270,7 +272,7 @@ class Milftoon : Madara("Milftoon", "https://milftoon.xxx", "en") { override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/page/$page/?m_orderby=latest", headers) } -class Hiperdex : Madara("Hiperdex", "https://hiperdex.net", "en") { +class Hiperdex : Madara("Hiperdex", "https://hiperdex.com", "en") { override fun getGenreList() = listOf( Genre("Adult", "adult"), Genre("Action", "action"), @@ -567,3 +569,9 @@ class ManyToonClub : Madara("ManyToonClub", "https://manytoon.club", "ko") class ManhuaUS : Madara("ManhuaUS", "https://manhuaus.com", "en") { override val pageListParseSelector = "li.blocks-gallery-item" } + +class MangaGecesi : Madara("Manga Gecesi", "https://mangagecesi.com", "tr") { + override val chapterUrlSelector = "li.wp-manga-chapter div.chapter-thumbnail + a" +} + +class MangaWT : Madara("MangaWT", "https://mangawt.com", "tr")