diff --git a/src/en/dynasty/build.gradle b/src/en/dynasty/build.gradle index 6c62be92a..8faded83b 100644 --- a/src/en/dynasty/build.gradle +++ b/src/en/dynasty/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Dynasty' extClass = '.DynastyFactory' - extVersionCode = 24 + extVersionCode = 25 } apply from: "$rootDir/common.gradle" diff --git a/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyFactory.kt b/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyFactory.kt index b1cf88ea8..8fb512e97 100644 --- a/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyFactory.kt +++ b/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyFactory.kt @@ -14,4 +14,5 @@ fun getAllDynasty() = DynastyDoujins(), DynastyIssues(), DynastySeries(), + DynastyScanlator(), ) diff --git a/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScanlator.kt b/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScanlator.kt new file mode 100644 index 000000000..4f633ca6f --- /dev/null +++ b/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScanlator.kt @@ -0,0 +1,44 @@ +package eu.kanade.tachiyomi.extension.en.dynasty + +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Request +import okhttp3.Response +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element + +class DynastyScanlator : DynastyScans() { + override val name = "Dynasty-Scanlator" + override val searchPrefix = "scanlators" + override val categoryPrefix = "Scanlator" + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { + return GET( + "$baseUrl/search?q=$query&classes%5B%5D=$categoryPrefix&page=$page&sort=", + headers, + ) + } + + override fun popularMangaInitialUrl() = "" + + override fun popularMangaFromElement(element: Element): SManga { + val manga = SManga.create() + manga.setUrlWithoutDomain(element.select("a").attr("href")) + manga.title = element.select("div.caption").text() + return manga + } + + override fun mangaDetailsParse(document: Document): SManga { + val manga = SManga.create() + parseHeader(document, manga) + return manga + } + + override fun chapterListSelector() = "dl.chapter-list > dd" + + override fun chapterListParse(response: Response): List { + return super.chapterListParse(response).reversed() + } +}