From b1f6d28cc1db9eb5eaadfbd9da5a9e6ab6095217 Mon Sep 17 00:00:00 2001 From: Vetle Ledaal Date: Fri, 4 Feb 2022 19:17:05 +0000 Subject: [PATCH] MadTheme: add rate limit (1/2) (#10700) --- .../overrides/madtheme/beehentai/BeeHentai.kt | 19 +++++++++++++++++++ .../overrides/madtheme/boxmanhwa/BoxManhwa.kt | 19 +++++++++++++++++++ .../madtheme/default/additional.gradle.kts | 4 ++++ .../madtheme/mangabuddy/MangaBuddy.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangacute/MangaCute.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangafab/MangaFab.kt | 19 +++++++++++++++++++ .../madtheme/mangaforest/MangaForest.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangamad/MangaMad.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangamax/MangaMax.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangasaga/MangaSaga.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangaspin/MangaSpin.kt | 19 +++++++++++++++++++ .../overrides/madtheme/mangaxyz/MangaXYZ.kt | 19 +++++++++++++++++++ .../overrides/madtheme/manhuanow/ManhuaNow.kt | 19 +++++++++++++++++++ .../madtheme/manhuasite/ManhuaSite.kt | 19 +++++++++++++++++++ .../overrides/madtheme/tooniclub/TooniClub.kt | 19 +++++++++++++++++++ .../overrides/madtheme/toonifab/TooniFab.kt | 19 +++++++++++++++++++ .../overrides/madtheme/toonilyme/ToonilyMe.kt | 19 +++++++++++++++++++ .../overrides/madtheme/toonitube/TooniTube.kt | 19 +++++++++++++++++++ .../overrides/madtheme/truemanga/TrueManga.kt | 19 +++++++++++++++++++ .../multisrc/madtheme/MadThemeGenerator.kt | 2 +- 20 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 multisrc/overrides/madtheme/beehentai/BeeHentai.kt create mode 100644 multisrc/overrides/madtheme/boxmanhwa/BoxManhwa.kt create mode 100644 multisrc/overrides/madtheme/default/additional.gradle.kts create mode 100644 multisrc/overrides/madtheme/mangabuddy/MangaBuddy.kt create mode 100644 multisrc/overrides/madtheme/mangacute/MangaCute.kt create mode 100644 multisrc/overrides/madtheme/mangafab/MangaFab.kt create mode 100644 multisrc/overrides/madtheme/mangaforest/MangaForest.kt create mode 100644 multisrc/overrides/madtheme/mangamad/MangaMad.kt create mode 100644 multisrc/overrides/madtheme/mangamax/MangaMax.kt create mode 100644 multisrc/overrides/madtheme/mangasaga/MangaSaga.kt create mode 100644 multisrc/overrides/madtheme/mangaspin/MangaSpin.kt create mode 100644 multisrc/overrides/madtheme/mangaxyz/MangaXYZ.kt create mode 100644 multisrc/overrides/madtheme/manhuanow/ManhuaNow.kt create mode 100644 multisrc/overrides/madtheme/manhuasite/ManhuaSite.kt create mode 100644 multisrc/overrides/madtheme/tooniclub/TooniClub.kt create mode 100644 multisrc/overrides/madtheme/toonifab/TooniFab.kt create mode 100644 multisrc/overrides/madtheme/toonilyme/ToonilyMe.kt create mode 100644 multisrc/overrides/madtheme/toonitube/TooniTube.kt create mode 100644 multisrc/overrides/madtheme/truemanga/TrueManga.kt diff --git a/multisrc/overrides/madtheme/beehentai/BeeHentai.kt b/multisrc/overrides/madtheme/beehentai/BeeHentai.kt new file mode 100644 index 000000000..e25bf0259 --- /dev/null +++ b/multisrc/overrides/madtheme/beehentai/BeeHentai.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class BeeHentai : MadTheme( + "BeeHentai", + "https://beehentai.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/boxmanhwa/BoxManhwa.kt b/multisrc/overrides/madtheme/boxmanhwa/BoxManhwa.kt new file mode 100644 index 000000000..369029556 --- /dev/null +++ b/multisrc/overrides/madtheme/boxmanhwa/BoxManhwa.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class BoxManhwa : MadTheme( + "BoxManhwa", + "https://boxmanhwa.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/default/additional.gradle.kts b/multisrc/overrides/madtheme/default/additional.gradle.kts new file mode 100644 index 000000000..10beb8157 --- /dev/null +++ b/multisrc/overrides/madtheme/default/additional.gradle.kts @@ -0,0 +1,4 @@ + +dependencies { + implementation project(':lib-ratelimit') +} diff --git a/multisrc/overrides/madtheme/mangabuddy/MangaBuddy.kt b/multisrc/overrides/madtheme/mangabuddy/MangaBuddy.kt new file mode 100644 index 000000000..aecdc7c31 --- /dev/null +++ b/multisrc/overrides/madtheme/mangabuddy/MangaBuddy.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaBuddy : MadTheme( + "MangaBuddy", + "https://mangabuddy.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangacute/MangaCute.kt b/multisrc/overrides/madtheme/mangacute/MangaCute.kt new file mode 100644 index 000000000..7cfd1e62f --- /dev/null +++ b/multisrc/overrides/madtheme/mangacute/MangaCute.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaCute : MadTheme( + "MangaCute", + "https://mangacute.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangafab/MangaFab.kt b/multisrc/overrides/madtheme/mangafab/MangaFab.kt new file mode 100644 index 000000000..73540a456 --- /dev/null +++ b/multisrc/overrides/madtheme/mangafab/MangaFab.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaFab : MadTheme( + "MangaFab", + "https://mangafab.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangaforest/MangaForest.kt b/multisrc/overrides/madtheme/mangaforest/MangaForest.kt new file mode 100644 index 000000000..08b6fde30 --- /dev/null +++ b/multisrc/overrides/madtheme/mangaforest/MangaForest.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaForest : MadTheme( + "MangaForest", + "https://mangaforest.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangamad/MangaMad.kt b/multisrc/overrides/madtheme/mangamad/MangaMad.kt new file mode 100644 index 000000000..14089f8dc --- /dev/null +++ b/multisrc/overrides/madtheme/mangamad/MangaMad.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaMad : MadTheme( + "MangaMad", + "https://mangamad.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangamax/MangaMax.kt b/multisrc/overrides/madtheme/mangamax/MangaMax.kt new file mode 100644 index 000000000..959f6ee37 --- /dev/null +++ b/multisrc/overrides/madtheme/mangamax/MangaMax.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaMax : MadTheme( + "MangaMax", + "https://mangamax.net", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangasaga/MangaSaga.kt b/multisrc/overrides/madtheme/mangasaga/MangaSaga.kt new file mode 100644 index 000000000..025da81d3 --- /dev/null +++ b/multisrc/overrides/madtheme/mangasaga/MangaSaga.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaSaga : MadTheme( + "MangaSaga", + "https://mangasaga.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangaspin/MangaSpin.kt b/multisrc/overrides/madtheme/mangaspin/MangaSpin.kt new file mode 100644 index 000000000..fea748933 --- /dev/null +++ b/multisrc/overrides/madtheme/mangaspin/MangaSpin.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaSpin : MadTheme( + "MangaSpin", + "https://mangaspin.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/mangaxyz/MangaXYZ.kt b/multisrc/overrides/madtheme/mangaxyz/MangaXYZ.kt new file mode 100644 index 000000000..78533238a --- /dev/null +++ b/multisrc/overrides/madtheme/mangaxyz/MangaXYZ.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class MangaXYZ : MadTheme( + "MangaXYZ", + "https://mangaxyz.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/manhuanow/ManhuaNow.kt b/multisrc/overrides/madtheme/manhuanow/ManhuaNow.kt new file mode 100644 index 000000000..32808370b --- /dev/null +++ b/multisrc/overrides/madtheme/manhuanow/ManhuaNow.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class ManhuaNow : MadTheme( + "ManhuaNow", + "https://manhuanow.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/manhuasite/ManhuaSite.kt b/multisrc/overrides/madtheme/manhuasite/ManhuaSite.kt new file mode 100644 index 000000000..db3ea6cfc --- /dev/null +++ b/multisrc/overrides/madtheme/manhuasite/ManhuaSite.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class ManhuaSite : MadTheme( + "ManhuaSite", + "https://manhuasite.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/tooniclub/TooniClub.kt b/multisrc/overrides/madtheme/tooniclub/TooniClub.kt new file mode 100644 index 000000000..0515fdd18 --- /dev/null +++ b/multisrc/overrides/madtheme/tooniclub/TooniClub.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class TooniClub : MadTheme( + "TooniClub", + "https://tooniclub.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/toonifab/TooniFab.kt b/multisrc/overrides/madtheme/toonifab/TooniFab.kt new file mode 100644 index 000000000..a9012aab0 --- /dev/null +++ b/multisrc/overrides/madtheme/toonifab/TooniFab.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class TooniFab : MadTheme( + "TooniFab", + "https://toonifab.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/toonilyme/ToonilyMe.kt b/multisrc/overrides/madtheme/toonilyme/ToonilyMe.kt new file mode 100644 index 000000000..561c3446e --- /dev/null +++ b/multisrc/overrides/madtheme/toonilyme/ToonilyMe.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class ToonilyMe : MadTheme( +"Toonily.me", +"https://toonily.me", +"en", +SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/toonitube/TooniTube.kt b/multisrc/overrides/madtheme/toonitube/TooniTube.kt new file mode 100644 index 000000000..384676a77 --- /dev/null +++ b/multisrc/overrides/madtheme/toonitube/TooniTube.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class TooniTube : MadTheme( + "TooniTube", + "https://toonitube.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/overrides/madtheme/truemanga/TrueManga.kt b/multisrc/overrides/madtheme/truemanga/TrueManga.kt new file mode 100644 index 000000000..90293ee42 --- /dev/null +++ b/multisrc/overrides/madtheme/truemanga/TrueManga.kt @@ -0,0 +1,19 @@ +package eu.kanade.tachiyomi.extension.en.madtheme + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme +import okhttp3.OkHttpClient +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class TrueManga : MadTheme( + "TrueManga", + "https://truemanga.com", + "en", + SimpleDateFormat("MMM dd, yyy", Locale.US) +) { + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) + .build() +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt index af5fc8e65..9acd1fcb0 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madtheme/MadThemeGenerator.kt @@ -9,7 +9,7 @@ class MadThemeGenerator : ThemeSourceGenerator { override val themeClass = "MadTheme" - override val baseVersionCode: Int = 2 + override val baseVersionCode: Int = 3 override val sources = listOf( SingleLang("BeeHentai", "https://beehentai.com", "en", isNsfw = true),