diff --git a/multisrc/overrides/mangahub/default/additional.gradle.kts b/multisrc/overrides/mangahub/default/additional.gradle.kts new file mode 100644 index 000000000..10beb8157 --- /dev/null +++ b/multisrc/overrides/mangahub/default/additional.gradle.kts @@ -0,0 +1,4 @@ + +dependencies { + implementation project(':lib-ratelimit') +} diff --git a/multisrc/overrides/mangahub/default/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/default/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..577d38e5a Binary files /dev/null and b/multisrc/overrides/mangahub/default/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/default/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/default/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..d3f357b36 Binary files /dev/null and b/multisrc/overrides/mangahub/default/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/default/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/default/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..2d18952af Binary files /dev/null and b/multisrc/overrides/mangahub/default/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/default/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/default/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..2ec50ca90 Binary files /dev/null and b/multisrc/overrides/mangahub/default/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/default/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/default/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..e4c9c7f68 Binary files /dev/null and b/multisrc/overrides/mangahub/default/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/default/res/web_hi_res_512.png b/multisrc/overrides/mangahub/default/res/web_hi_res_512.png new file mode 100644 index 000000000..011896f7f Binary files /dev/null and b/multisrc/overrides/mangahub/default/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..ac1b1b1dd Binary files /dev/null and b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..d1bf8f50d Binary files /dev/null and b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..4c2691d84 Binary files /dev/null and b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..fe6a1b57b Binary files /dev/null and b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..09a914f11 Binary files /dev/null and b/multisrc/overrides/mangahub/mangafoxfun/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangafoxfun/res/web_hi_res_512.png new file mode 100644 index 000000000..8016edb48 Binary files /dev/null and b/multisrc/overrides/mangahub/mangafoxfun/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangafoxfun/src/MangaFoxFun.kt b/multisrc/overrides/mangahub/mangafoxfun/src/MangaFoxFun.kt new file mode 100644 index 000000000..dbf074b14 --- /dev/null +++ b/multisrc/overrides/mangahub/mangafoxfun/src/MangaFoxFun.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangafoxfun + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaFoxFun : MangaHub( + "MangaFox.fun", + "https://mangafox.fun", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mf01" +} diff --git a/multisrc/overrides/mangahub/mangahereonl/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..01c4e8a3a Binary files /dev/null and b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahereonl/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..9af3d7b90 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..9c82265a6 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..7e75e7e83 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..f08e6d51a Binary files /dev/null and b/multisrc/overrides/mangahub/mangahereonl/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahereonl/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangahereonl/res/web_hi_res_512.png new file mode 100644 index 000000000..2672b4cfa Binary files /dev/null and b/multisrc/overrides/mangahub/mangahereonl/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangahereonl/src/MangaHereOnl.kt b/multisrc/overrides/mangahub/mangahereonl/src/MangaHereOnl.kt new file mode 100644 index 000000000..bf93dc5f4 --- /dev/null +++ b/multisrc/overrides/mangahub/mangahereonl/src/MangaHereOnl.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangahereonl + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaHereOnl : MangaHub( + "MangaHere.onl", + "https://mangahere.onl", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mh01" +} diff --git a/multisrc/overrides/mangahub/mangahubio/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahubio/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..d90dd1a47 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahubio/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahubio/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahubio/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..e15bccd84 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahubio/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahubio/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahubio/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..74a4e6d4f Binary files /dev/null and b/multisrc/overrides/mangahub/mangahubio/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahubio/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahubio/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..51abe4128 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahubio/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahubio/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangahubio/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..44ff56f38 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahubio/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangahubio/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangahubio/res/web_hi_res_512.png new file mode 100644 index 000000000..751106d78 Binary files /dev/null and b/multisrc/overrides/mangahub/mangahubio/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangahubio/src/MangaHubIo.kt b/multisrc/overrides/mangahub/mangahubio/src/MangaHubIo.kt new file mode 100644 index 000000000..5df6be2d4 --- /dev/null +++ b/multisrc/overrides/mangahub/mangahubio/src/MangaHubIo.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangahubio + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaHubIo : MangaHub( + "MangaHub", + "https://mangahub.io", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "m01" +} diff --git a/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..e61fef813 Binary files /dev/null and b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..badefdba6 Binary files /dev/null and b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..871c66d62 Binary files /dev/null and b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..04d7c6030 Binary files /dev/null and b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..b614ca978 Binary files /dev/null and b/multisrc/overrides/mangahub/mangakakalotfun/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangakakalotfun/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangakakalotfun/res/web_hi_res_512.png new file mode 100644 index 000000000..2ac257a66 Binary files /dev/null and b/multisrc/overrides/mangahub/mangakakalotfun/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangakakalotfun/src/MangakakalotFun.kt b/multisrc/overrides/mangahub/mangakakalotfun/src/MangakakalotFun.kt new file mode 100644 index 000000000..9cce3e92c --- /dev/null +++ b/multisrc/overrides/mangahub/mangakakalotfun/src/MangakakalotFun.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangakalotfun + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangakakalotFun : MangaHub( + "Mangakakalot.fun", + "https://mangakakalot.fun", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mn01" +} diff --git a/multisrc/overrides/mangahub/manganel/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/manganel/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..cd8ae0761 Binary files /dev/null and b/multisrc/overrides/mangahub/manganel/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/manganel/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/manganel/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..8f08dfb56 Binary files /dev/null and b/multisrc/overrides/mangahub/manganel/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/manganel/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/manganel/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..ab0c6c6f5 Binary files /dev/null and b/multisrc/overrides/mangahub/manganel/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/manganel/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/manganel/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..0b7e54eb1 Binary files /dev/null and b/multisrc/overrides/mangahub/manganel/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/manganel/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/manganel/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..c45505ce4 Binary files /dev/null and b/multisrc/overrides/mangahub/manganel/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/manganel/res/web_hi_res_512.png b/multisrc/overrides/mangahub/manganel/res/web_hi_res_512.png new file mode 100644 index 000000000..2591fd06a Binary files /dev/null and b/multisrc/overrides/mangahub/manganel/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/manganel/src/MangaNel.kt b/multisrc/overrides/mangahub/manganel/src/MangaNel.kt new file mode 100644 index 000000000..2ad04167a --- /dev/null +++ b/multisrc/overrides/mangahub/manganel/src/MangaNel.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.manganel + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaNel : MangaHub( + "MangaNel", + "https://manganel.me", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mn05" +} diff --git a/multisrc/overrides/mangahub/mangaonlinefun/src/MangaOnlineFun.kt b/multisrc/overrides/mangahub/mangaonlinefun/src/MangaOnlineFun.kt new file mode 100644 index 000000000..fd4627851 --- /dev/null +++ b/multisrc/overrides/mangahub/mangaonlinefun/src/MangaOnlineFun.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangaonlinefun + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaOnlineFun : MangaHub( + "MangaOnline.fun", + "https://mangaonline.fun", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "m02" +} diff --git a/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..40118fc2d Binary files /dev/null and b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..63f0b6a00 Binary files /dev/null and b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..f320df33c Binary files /dev/null and b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..af37887a7 Binary files /dev/null and b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..a47ed538e Binary files /dev/null and b/multisrc/overrides/mangahub/mangapandaonl/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangapandaonl/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangapandaonl/res/web_hi_res_512.png new file mode 100644 index 000000000..96698a496 Binary files /dev/null and b/multisrc/overrides/mangahub/mangapandaonl/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangapandaonl/src/MangaPandaOnl.kt b/multisrc/overrides/mangahub/mangapandaonl/src/MangaPandaOnl.kt new file mode 100644 index 000000000..08a9587d6 --- /dev/null +++ b/multisrc/overrides/mangahub/mangapandaonl/src/MangaPandaOnl.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangapandaonl + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaPandaOnl : MangaHub( + "MangaPanda.onl", + "https://mangapanda.onl", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mr02" +} diff --git a/multisrc/overrides/mangahub/mangareadersite/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..4ebfce2a4 Binary files /dev/null and b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangareadersite/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..6ef6d33e8 Binary files /dev/null and b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..2f082671a Binary files /dev/null and b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..2f339dc7a Binary files /dev/null and b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..ed720a9e4 Binary files /dev/null and b/multisrc/overrides/mangahub/mangareadersite/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangareadersite/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangareadersite/res/web_hi_res_512.png new file mode 100644 index 000000000..2c8b07e85 Binary files /dev/null and b/multisrc/overrides/mangahub/mangareadersite/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangareadersite/src/MangaReaderSite.kt b/multisrc/overrides/mangahub/mangareadersite/src/MangaReaderSite.kt new file mode 100644 index 000000000..bf3b94910 --- /dev/null +++ b/multisrc/overrides/mangahub/mangareadersite/src/MangaReaderSite.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangareadersite + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaReaderSite : MangaHub( + "MangaReader.site", + "https://mangareader.site", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mr01" +} diff --git a/multisrc/overrides/mangahub/mangatoday/src/MangaToday.kt b/multisrc/overrides/mangahub/mangatoday/src/MangaToday.kt new file mode 100644 index 000000000..4be77d1c1 --- /dev/null +++ b/multisrc/overrides/mangahub/mangatoday/src/MangaToday.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangatoday + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaToday : MangaHub( + "MangaToday", + "https://mangatoday.fun", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "m03" +} diff --git a/multisrc/overrides/mangahub/mangatownhub/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..f0b60543c Binary files /dev/null and b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangatownhub/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..4fbb4c3b3 Binary files /dev/null and b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..e40910d2d Binary files /dev/null and b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..cba5add27 Binary files /dev/null and b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..136ece821 Binary files /dev/null and b/multisrc/overrides/mangahub/mangatownhub/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/mangatownhub/res/web_hi_res_512.png b/multisrc/overrides/mangahub/mangatownhub/res/web_hi_res_512.png new file mode 100644 index 000000000..21ee6338d Binary files /dev/null and b/multisrc/overrides/mangahub/mangatownhub/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/mangatownhub/src/MangaTownHub.kt b/multisrc/overrides/mangahub/mangatownhub/src/MangaTownHub.kt new file mode 100644 index 000000000..9566f48c8 --- /dev/null +++ b/multisrc/overrides/mangahub/mangatownhub/src/MangaTownHub.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.mangatownhub + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaTownHub : MangaHub( + "MangaTown (unoriginal)", + "https://manga.town", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mt01" +} diff --git a/multisrc/overrides/mangahub/onemangaco/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangahub/onemangaco/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..348c8db8b Binary files /dev/null and b/multisrc/overrides/mangahub/onemangaco/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/onemangaco/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangahub/onemangaco/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..7a817ef0e Binary files /dev/null and b/multisrc/overrides/mangahub/onemangaco/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/onemangaco/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangahub/onemangaco/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..2555f2a83 Binary files /dev/null and b/multisrc/overrides/mangahub/onemangaco/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/onemangaco/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/onemangaco/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..3e540c7df Binary files /dev/null and b/multisrc/overrides/mangahub/onemangaco/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/onemangaco/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangahub/onemangaco/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..6b474bbb8 Binary files /dev/null and b/multisrc/overrides/mangahub/onemangaco/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangahub/onemangaco/res/web_hi_res_512.png b/multisrc/overrides/mangahub/onemangaco/res/web_hi_res_512.png new file mode 100644 index 000000000..7ef38bdf1 Binary files /dev/null and b/multisrc/overrides/mangahub/onemangaco/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangahub/onemangaco/src/OneMangaCo.kt b/multisrc/overrides/mangahub/onemangaco/src/OneMangaCo.kt new file mode 100644 index 000000000..294bd8f25 --- /dev/null +++ b/multisrc/overrides/mangahub/onemangaco/src/OneMangaCo.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.onemangaco + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class OneMangaCo : MangaHub( + "1Manga.co", + "https://1manga.co", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mn03" +} diff --git a/multisrc/overrides/mangahub/onemangainfo/src/OneMangaInfo.kt b/multisrc/overrides/mangahub/onemangainfo/src/OneMangaInfo.kt new file mode 100644 index 000000000..f64620367 --- /dev/null +++ b/multisrc/overrides/mangahub/onemangainfo/src/OneMangaInfo.kt @@ -0,0 +1,20 @@ +package eu.kanade.tachiyomi.extension.en.onemangainfo + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.mangahub.MangaHub +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class OneMangaInfo : MangaHub( + "OneManga.info", + "https://onemanga.info", + "en" +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() + + override val serverId = "mn02" +} diff --git a/src/en/mangahub/src/eu/kanade/tachiyomi/extension/en/mangahub/Mangahub.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt similarity index 53% rename from src/en/mangahub/src/eu/kanade/tachiyomi/extension/en/mangahub/Mangahub.kt rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt index 1a12c3f2c..b142090e2 100644 --- a/src/en/mangahub/src/eu/kanade/tachiyomi/extension/en/mangahub/Mangahub.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHub.kt @@ -1,117 +1,181 @@ -package eu.kanade.tachiyomi.extension.en.mangahub +package eu.kanade.tachiyomi.multisrc.mangahub import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.ParsedHttpSource +import eu.kanade.tachiyomi.util.asJsoup +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element import uy.kohesive.injekt.injectLazy -import java.net.URL import java.text.ParseException import java.text.SimpleDateFormat import java.util.Calendar import java.util.Locale -class Mangahub : ParsedHttpSource() { - - override val name = "Mangahub" - - override val baseUrl = "https://www.mangahub.io" - - override val lang = "en" +abstract class MangaHub( + override val name: String, + override val baseUrl: String, + override val lang: String, + private val dateFormat: SimpleDateFormat = SimpleDateFormat("MM-dd-yyyy", Locale.US) +) : ParsedHttpSource() { override val supportsLatest = true - override fun popularMangaSelector() = "#mangalist div.media-manga.media" + private val json: Json by injectLazy() - override fun latestUpdatesSelector() = popularMangaSelector() + protected abstract val serverId: String - override fun popularMangaRequest(page: Int): Request { - return GET("$baseUrl/popular/page/$page", headers) - } + // Popular + override fun popularMangaRequest(page: Int): Request = + GET("$baseUrl/popular/page/$page", headers) - override fun latestUpdatesRequest(page: Int): Request { - return GET("$baseUrl/updates/page/$page", headers) - } + override fun popularMangaParse(response: Response): MangasPage = + searchMangaParse(response) - override fun popularMangaFromElement(element: Element): SManga { - val manga = SManga.create() + override fun popularMangaSelector(): String = + "#mangalist div.media-manga.media" - val titleElement = element.select(".media-heading > a").first() - manga.title = titleElement.text() - manga.setUrlWithoutDomain(URL(titleElement.attr("href")).path) - manga.thumbnail_url = element.select("img.manga-thumb.list-item-thumb") - ?.first()?.attr("src") + override fun popularMangaFromElement(element: Element): SManga = + searchMangaFromElement(element) - return manga - } + override fun popularMangaNextPageSelector(): String? = + searchMangaNextPageSelector() - override fun latestUpdatesFromElement(element: Element): SManga { - return popularMangaFromElement(element) - } + // Latest + override fun latestUpdatesRequest(page: Int): Request = + GET("$baseUrl/updates/page/$page", headers) - override fun popularMangaNextPageSelector() = "ul.pager li.next > a" + override fun latestUpdatesParse(response: Response): MangasPage = + searchMangaParse(response) - override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() + override fun latestUpdatesSelector(): String = + popularMangaSelector() - override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() + override fun latestUpdatesFromElement(element: Element): SManga = + searchMangaFromElement(element) - override fun mangaDetailsParse(document: Document): SManga { - val manga = SManga.create() - manga.title = document.select("h1._3xnDj").first().ownText() - manga.author = document.select("._3QCtP > div:nth-child(2) > div:nth-child(1) > span:nth-child(2)")?.first()?.text() - manga.artist = document.select("._3QCtP > div:nth-child(2) > div:nth-child(2) > span:nth-child(2)")?.first()?.text() - manga.genre = document.select("._3Czbn a")?.joinToString { it.text() } - manga.description = document.select("div#noanim-content-tab-pane-99 p.ZyMp7")?.first()?.text() - manga.thumbnail_url = document.select("img.img-responsive")?.first() - ?.attr("src") + override fun latestUpdatesNextPageSelector(): String? = + searchMangaNextPageSelector() - document.select("._3QCtP > div:nth-child(2) > div:nth-child(3) > span:nth-child(2)")?.first()?.text()?.also { statusText -> - when { - statusText.contains("ongoing", true) -> manga.status = SManga.ONGOING - statusText.contains("completed", true) -> manga.status = SManga.COMPLETED - else -> manga.status = SManga.UNKNOWN + // Search + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { + // https://mangahub.io/search/page/1?q=a&order=POPULAR&genre=all + val url = "$baseUrl/search/page/$page".toHttpUrl().newBuilder() + .addQueryParameter("q", query) + (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> + when (filter) { + is OrderBy -> { + val order = filter.values[filter.state] + url.addQueryParameter("order", order.key) + } + is GenreList -> { + val genre = filter.values[filter.state] + url.addQueryParameter("genre", genre.key) + } + else -> {} } } + return GET(url.toString(), headers) + } + + override fun searchMangaParse(response: Response): MangasPage { + val document = response.asJsoup() + + /* + * To remove duplicates we group by the thumbnail_url, which is + * common between duplicates. The duplicates have a suffix in the + * url "-by-{name}". Here we select the shortest url, to avoid + * removing manga that has "by" in the title already. + * Example: + * /manga/tales-of-demons-and-gods (kept) + * /manga/tales-of-demons-and-gods-by-mad-snail (removed) + * /manga/leveling-up-by-only-eating (kept) + */ + val mangas = document.select(searchMangaSelector()).map { element -> + searchMangaFromElement(element) + }.groupBy { it.thumbnail_url }.mapValues { (_, values) -> + values.minByOrNull { it.url.length }!! + }.values.toList() + + val hasNextPage = searchMangaNextPageSelector()?.let { selector -> + document.select(selector).first() + } != null + + return MangasPage(mangas, hasNextPage) + } + + override fun searchMangaSelector() = "div#mangalist div.media-manga.media" + + override fun searchMangaFromElement(element: Element): SManga = SManga.create().apply { + val titleElement = element.select(".media-heading > a").first() + setUrlWithoutDomain(titleElement.attr("abs:href")) + + title = titleElement.text() + thumbnail_url = element + .select("img.manga-thumb.list-item-thumb") + ?.first()?.attr("abs:src") + } + + override fun searchMangaNextPageSelector() = "ul.pager li.next > a" + + // Details + override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply { + title = document.select("h1._3xnDj").first().ownText() + author = document + .select("._3QCtP > div:nth-child(2) > div:nth-child(1) > span:nth-child(2)") + ?.first()?.text() + artist = document + .select("._3QCtP > div:nth-child(2) > div:nth-child(2) > span:nth-child(2)") + ?.first()?.text() + genre = document.select("._3Czbn a")?.joinToString { it.text() } + description = document.select("div#noanim-content-tab-pane-99 p.ZyMp7")?.first()?.text() + thumbnail_url = document.select("img.img-responsive")?.first()?.attr("abs:src") + + document.select("._3QCtP > div:nth-child(2) > div:nth-child(3) > span:nth-child(2)") + ?.first()?.text()?.also { statusText -> + status = when { + statusText.contains("ongoing", true) -> SManga.ONGOING + statusText.contains("completed", true) -> SManga.COMPLETED + else -> SManga.UNKNOWN + } + } // add alternative name to manga description val altName = "Alternative Name: " document.select("h1 small").firstOrNull()?.ownText()?.let { if (it.isBlank().not()) { - manga.description = when { - manga.description.isNullOrBlank() -> altName + it - else -> manga.description + "\n\n$altName" + it + description = when { + description.isNullOrBlank() -> altName + it + else -> description + "\n\n$altName" + it } } } - - return manga } + // Chapters override fun chapterListSelector() = ".tab-content .tab-pane li.list-group-item > a" - override fun chapterFromElement(element: Element): SChapter { - val chapter = SChapter.create() - - chapter.setUrlWithoutDomain(element.attr("href")) - chapter.name = element.select("span._8Qtbo").text() - chapter.date_upload = element.select("small.UovLc").first()?.text()?.let { parseChapterDate(it) } ?: 0 - - return chapter + override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply { + setUrlWithoutDomain(element.attr("abs:href")) + name = element.select("span._8Qtbo").text() + date_upload = element.select("small.UovLc").first()?.text() + ?.let { parseChapterDate(it) } ?: 0 } private fun parseChapterDate(date: String): Long { @@ -144,80 +208,59 @@ class Mangahub : ParsedHttpSource() { // parses: "12-20-2019" and defaults everything that wasn't taken into account to 0 else -> { try { - parsedDate = SimpleDateFormat("MM-dd-yyyy", Locale.US).parse(date)?.time ?: 0L - } catch (e: ParseException) { /*nothing to do, parsedDate is initialized with 0L*/ } + parsedDate = dateFormat.parse(date)?.time ?: 0L + } catch (e: ParseException) { + /* nothing to do, parsedDate is initialized with 0L */ + } } } return parsedDate } + // Pages override fun pageListRequest(chapter: SChapter): Request { val jsonHeaders = headers.newBuilder().add("Content-Type", "application/json").build() - val slug = chapter.url.substringAfter("chapter/").substringBefore("/") - val number = chapter.url.substringAfter("chapter-").removeSuffix("/") + val slug = chapter.url + .substringAfter("chapter/") + .substringBefore("/") + val number = chapter.url + .substringAfter("chapter-") + .removeSuffix("/") val body = - "{\"query\":\"{chapter(x:m01,slug:\\\"$slug\\\",number:$number){id,title,mangaID,number,slug,date,pages,noAd,manga{id,title,slug,mainSlug,author,isWebtoon,isYaoi,isPorn,isSoftPorn,unauthFile,isLicensed}}}\"}".toRequestBody( + "{\"query\":\"{chapter(x:$serverId,slug:\\\"$slug\\\",number:$number){id,title,mangaID,number,slug,date,pages,noAd,manga{id,title,slug,mainSlug,author,isWebtoon,isYaoi,isPorn,isSoftPorn,unauthFile,isLicensed}}}\"}".toRequestBody( null ) return POST("https://api.mghubcdn.com/graphql", jsonHeaders, body) } - private val json: Json by injectLazy() - override fun pageListParse(response: Response): List { val cdn = "https://img.mghubcdn.com/file/imghub" + val chapterObject = json + .decodeFromString>(response.body!!.string()) - return json.decodeFromString(response.body!!.string())["data"]!! - .jsonObject["chapter"]!! - .jsonObject["pages"]!!.jsonPrimitive.content - .removeSurrounding("\"").replace("\\", "") - .let { cleaned -> - val jsonObject = json.decodeFromString(cleaned) - jsonObject.keys.map { key -> jsonObject[key]!!.jsonPrimitive.content } - } - .mapIndexed { i, tail -> Page(i, "", "$cdn/$tail") } + val pagesObject = json + .decodeFromString(chapterObject.data.chapter.pages) + val pages = pagesObject.values.map { it.jsonPrimitive.content } + + return pages.mapIndexed { i, path -> Page(i, "", "$cdn/$path") } } - override fun pageListParse(document: Document): List = throw UnsupportedOperationException("Not used") + override fun pageListParse(document: Document): List = + throw UnsupportedOperationException("Not used.") - override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used") - - // https://mangahub.io/search/page/1?q=a&order=POPULAR&genre=all - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val url = "$baseUrl/search/page/$page".toHttpUrlOrNull()?.newBuilder()!!.addQueryParameter("q", query) - (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> - when (filter) { - is OrderBy -> { - val order = filter.values[filter.state] - url.addQueryParameter("order", order.key) - } - is GenreList -> { - val genre = filter.values[filter.state] - url.addQueryParameter("genre", genre.key) - } - } - } - return GET(url.toString(), headers) - } - - override fun searchMangaSelector() = "div#mangalist div.media-manga.media" - - override fun searchMangaFromElement(element: Element): SManga { - return popularMangaFromElement(element) - } + // Image + override fun imageUrlParse(document: Document): String = + throw UnsupportedOperationException("Not used.") + // Filters private class Genre(title: String, val key: String) : Filter.TriState(title) { - override fun toString(): String { - return name - } + override fun toString(): String = name } private class Order(title: String, val key: String) : Filter.TriState(title) { - override fun toString(): String { - return name - } + override fun toString(): String = name } private class OrderBy(orders: Array) : Filter.Select("Order", orders, 0) @@ -305,3 +348,42 @@ class Mangahub : ParsedHttpSource() { Genre("Yuri", "yuri") ) } + +// DTO +@Serializable +data class GraphQLDataDto( + val data: T +) + +@Serializable +data class ChapterDto( + val chapter: ChapterInnerDto +) + +@Serializable +data class ChapterInnerDto( + val date: String, + val id: Int, + val manga: MangaInnerDto, + @SerialName("mangaID") val mangaId: Int, + val noAd: Boolean, + val number: Int, + val pages: String, + val slug: String, + val title: String +) + +@Serializable +data class MangaInnerDto( + val author: String, + val id: Int, + val isLicensed: Boolean, + val isPorn: Boolean, + val isSoftPorn: Boolean, + val isWebtoon: Boolean, + val isYaoi: Boolean, + val mainSlug: String, + val slug: String, + val title: String, + val unauthFile: Boolean +) 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 new file mode 100644 index 000000000..d5bab6b4b --- /dev/null +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangahub/MangaHubGenerator.kt @@ -0,0 +1,36 @@ +package eu.kanade.tachiyomi.multisrc.mangahub + +import generator.ThemeSourceData.SingleLang +import generator.ThemeSourceGenerator + +class MangaHubGenerator : ThemeSourceGenerator { + + override val themePkg = "mangahub" + + override val themeClass = "MangaHub" + + override val baseVersionCode: Int = 1 + + override val sources = listOf( + SingleLang("1Manga.co", "https://1manga.co", "en", isNsfw = true, className = "OneMangaCo"), + SingleLang("MangaFox.fun", "https://mangafox.fun", "en", isNsfw = true, className = "MangaFoxFun"), + SingleLang("MangaHere.onl", "https://mangahere.onl", "en", isNsfw = true, className = "MangaHereOnl"), + SingleLang("MangaHub", "https://mangahub.io", "en", isNsfw = true, overrideVersionCode = 10, className = "MangaHubIo"), + SingleLang("Mangakakalot.fun", "https://mangakakalot.fun", "en", isNsfw = true, className = "MangakakalotFun"), + SingleLang("MangaNel", "https://manganel.me", "en", isNsfw = true), + SingleLang("MangaOnline.fun", "https://mangaonline.fun", "en", isNsfw = true, className = "MangaOnlineFun"), + SingleLang("MangaPanda.onl", "https://mangapanda.onl", "en", className = "MangaPandaOnl"), + SingleLang("MangaReader.site", "https://mangareader.site", "en", className = "MangaReaderSite"), + SingleLang("MangaToday", "https://mangatoday.fun", "en", isNsfw = true), + SingleLang("MangaTown (unoriginal)", "https://manga.town", "en", isNsfw = true, className = "MangaTownHub"), + // SingleLang("MF Read Online", "https://mangafreereadonline.com", "en", isNsfw = true), // different pageListParse logic + // SingleLang("OneManga.info", "https://onemanga.info", "en", isNsfw = true, className = "OneMangaInfo"), // Some chapters link to 1manga.co, hard to filter + ) + + companion object { + @JvmStatic + fun main(args: Array) { + MangaHubGenerator().createAll() + } + } +} diff --git a/src/en/mangahub/AndroidManifest.xml b/src/en/mangahub/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/en/mangahub/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/en/mangahub/build.gradle b/src/en/mangahub/build.gradle deleted file mode 100644 index 6e5e90b7f..000000000 --- a/src/en/mangahub/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlinx-serialization' - -ext { - extName = 'Mangahub' - pkgNameSuffix = 'en.mangahub' - extClass = '.Mangahub' - extVersionCode = 10 -} - -apply from: "$rootDir/common.gradle" diff --git a/src/en/mangahub/res/mipmap-hdpi/ic_launcher.png b/src/en/mangahub/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 354b23ee7..000000000 Binary files a/src/en/mangahub/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/mangahub/res/mipmap-mdpi/ic_launcher.png b/src/en/mangahub/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index d63b07893..000000000 Binary files a/src/en/mangahub/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/mangahub/res/mipmap-xhdpi/ic_launcher.png b/src/en/mangahub/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 31611e381..000000000 Binary files a/src/en/mangahub/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/mangahub/res/mipmap-xxhdpi/ic_launcher.png b/src/en/mangahub/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 1ebaf9c50..000000000 Binary files a/src/en/mangahub/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/mangahub/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/mangahub/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index aa1b41604..000000000 Binary files a/src/en/mangahub/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/mangahub/res/web_hi_res_512.png b/src/en/mangahub/res/web_hi_res_512.png deleted file mode 100644 index 30eb3d47e..000000000 Binary files a/src/en/mangahub/res/web_hi_res_512.png and /dev/null differ