From 18268d4078af14b8734893b9cd0c26fc2878707c Mon Sep 17 00:00:00 2001 From: Johannes Joens <34899572+jopejoe1@users.noreply.github.com> Date: Fri, 7 May 2021 23:31:20 +1200 Subject: [PATCH] Added DDHentai (#6876) * Update NyaHentaiGenerator.kt * Create DDHentaiFactory.kt * Update NyaHentaiGenerator.kt * Create DDHentaiAFactory.kt --- .../nyahentai/ddhentai/src/DDHentaiFactory.kt | 18 ++++++++++++++++++ .../ddhentaia/src/DDHentaiAFactory.kt | 18 ++++++++++++++++++ .../multisrc/nyahentai/NyaHentaiGenerator.kt | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 multisrc/overrides/nyahentai/ddhentai/src/DDHentaiFactory.kt create mode 100644 multisrc/overrides/nyahentai/ddhentaia/src/DDHentaiAFactory.kt diff --git a/multisrc/overrides/nyahentai/ddhentai/src/DDHentaiFactory.kt b/multisrc/overrides/nyahentai/ddhentai/src/DDHentaiFactory.kt new file mode 100644 index 000000000..d42ca0851 --- /dev/null +++ b/multisrc/overrides/nyahentai/ddhentai/src/DDHentaiFactory.kt @@ -0,0 +1,18 @@ +package eu.kanade.tachiyomi.extension.all.ddhentai + +import eu.kanade.tachiyomi.multisrc.nyahentai.NyaHentai +import eu.kanade.tachiyomi.source.Source +import eu.kanade.tachiyomi.source.SourceFactory + +class DDHentaiFactory : SourceFactory { + override fun createSources(): List = listOf( + DDHentaiEN(), + DDHentaiJA(), + DDHentaiZH(), + DDHentaiALL(), + ) +} +class DDHentaiEN : NyaHentai("DDHentai", "https://zh.ddhentai.com", "en") +class DDHentaiJA : NyaHentai("DDHentai", "https://zh.ddhentai.com", "ja") +class DDHentaiZH : NyaHentai("DDHentai", "https://zh.ddhentai.com", "zh") +class DDHentaiALL : NyaHentai("DDHentai", "https://zh.ddhentai.com", "all") diff --git a/multisrc/overrides/nyahentai/ddhentaia/src/DDHentaiAFactory.kt b/multisrc/overrides/nyahentai/ddhentaia/src/DDHentaiAFactory.kt new file mode 100644 index 000000000..4601f6518 --- /dev/null +++ b/multisrc/overrides/nyahentai/ddhentaia/src/DDHentaiAFactory.kt @@ -0,0 +1,18 @@ +package eu.kanade.tachiyomi.extension.all.ddhentaia + +import eu.kanade.tachiyomi.multisrc.nyahentai.NyaHentai +import eu.kanade.tachiyomi.source.Source +import eu.kanade.tachiyomi.source.SourceFactory + +class DDHentaiAFactory : SourceFactory { + override fun createSources(): List = listOf( + DDHentaiAEN(), + DDHentaiAJA(), + DDHentaiAZH(), + DDHentaiAALL(), + ) +} +class DDHentaiAEN : NyaHentai("DDHentai A", "https://zha.ddhentai.com", "en") +class DDHentaiAJA : NyaHentai("DDHentai A", "https://zha.ddhentai.com", "ja") +class DDHentaiAZH : NyaHentai("DDHentai A", "https://zha.ddhentai.com", "zh") +class DDHentaiAALL : NyaHentai("DDHentai A", "https://zha.ddhentai.com", "all") diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nyahentai/NyaHentaiGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nyahentai/NyaHentaiGenerator.kt index fd48f11fc..378be9ffb 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nyahentai/NyaHentaiGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nyahentai/NyaHentaiGenerator.kt @@ -26,6 +26,8 @@ class NyaHentaiGenerator : ThemeSourceGenerator { MultiLang("BugHentai (en)", "https://en.bughentai.com", listOf("en","ja", "zh", "all"), isNsfw = true, className = "BugHentaiEnFactory", pkgName = "bughentaien"), MultiLang("QQHentai", "https://zhb.qqhentai.com", listOf("en","ja", "zh", "all"), isNsfw = true, className = "QQHentaiFactory"), MultiLang("FoxHentai", "https://ja.foxhentai.com", listOf("en","ja", "zh", "all"), isNsfw = true, className = "FoxHentaiFactory"), + MultiLang("DDHentai", "https://zh.ddhentai.com", listOf("en","ja", "zh", "all"), isNsfw = true, className = "DDHentaiFactory"), + MultiLang("DDHentai A", "https://zha.ddhentai.com", listOf("en","ja", "zh", "all"), isNsfw = true, className = "DDHentaiAFactory"), ) companion object {