diff --git a/multisrc/overrides/madara/theblank/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/theblank/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..88c253755 Binary files /dev/null and b/multisrc/overrides/madara/theblank/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/theblank/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/theblank/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..4c10fb340 Binary files /dev/null and b/multisrc/overrides/madara/theblank/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/theblank/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/theblank/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..1810a81fc Binary files /dev/null and b/multisrc/overrides/madara/theblank/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/theblank/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/theblank/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..a57fc1069 Binary files /dev/null and b/multisrc/overrides/madara/theblank/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/theblank/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/theblank/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..a2765f05c Binary files /dev/null and b/multisrc/overrides/madara/theblank/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/theblank/res/web_hi_res_512.png b/multisrc/overrides/madara/theblank/res/web_hi_res_512.png new file mode 100644 index 000000000..7df497287 Binary files /dev/null and b/multisrc/overrides/madara/theblank/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/madara/theblank/src/TheBlank.kt b/multisrc/overrides/madara/theblank/src/TheBlank.kt new file mode 100644 index 000000000..a28fb4075 --- /dev/null +++ b/multisrc/overrides/madara/theblank/src/TheBlank.kt @@ -0,0 +1,47 @@ +package eu.kanade.tachiyomi.extension.en.theblank + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.model.MangasPage +import okhttp3.Response +import java.text.SimpleDateFormat +import java.util.Locale + +class TheBlank : Madara( + "The Blank Scanlation", + "https://theblank.net", + "en", + dateFormat = SimpleDateFormat("dd/MM/yy", Locale.US), +) { + + override val client = super.client.newBuilder() + .rateLimit(1) + .build() + + override val useNewChapterEndpoint = true + + override fun searchPage(page: Int): String { + return if (page > 1) { + "page/$page/" + } else { + "" + } + } + + override fun popularMangaParse(response: Response) = + super.popularMangaParse(response).fixNextPage() + + override fun latestUpdatesParse(response: Response) = + super.latestUpdatesParse(response).fixNextPage() + + override fun searchMangaParse(response: Response) = + super.searchMangaParse(response).fixNextPage() + + private fun MangasPage.fixNextPage(): MangasPage { + return if (mangas.size < 12) { + MangasPage(mangas, false) + } else { + this + } + } +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt index cae0545f8..6f1271879 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt @@ -637,7 +637,6 @@ abstract class Madara( val xhrHeaders = headersBuilder() .add("Content-Length", form.contentLength().toString()) .add("Content-Type", form.contentType().toString()) - .add("Referer", "$baseUrl/") .add("X-Requested-With", "XMLHttpRequest") .build() @@ -646,7 +645,6 @@ abstract class Madara( protected open fun xhrChaptersRequest(mangaUrl: String): Request { val xhrHeaders = headersBuilder() - .add("Referer", "$baseUrl/") .add("X-Requested-With", "XMLHttpRequest") .build() diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index e8ae896f3..8053295de 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -10,7 +10,7 @@ class MadaraGenerator : ThemeSourceGenerator { override val themeClass = "Madara" - override val baseVersionCode: Int = 31 + override val baseVersionCode: Int = 32 override val sources = listOf( MultiLang("Atlantis Scan", "https://atlantisscan.com", listOf("es", "pt-BR"), isNsfw = true), @@ -454,6 +454,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Taurus Fansub", "https://taurusmanga.com", "es", overrideVersionCode = 1), SingleLang("TeenManhua", "https://teenmanhua.com", "en", overrideVersionCode = 1), SingleLang("The Beginning After The End", "https://www.thebeginningaftertheend.fr", "fr", overrideVersionCode = 1), + SingleLang("The Blank Scanlation", "https://theblank.net", "en", className = "TheBlank", isNsfw = true), SingleLang("The Guild", "https://theguildscans.com", "en"), SingleLang("Time Naight", "https://timenaight.com", "tr"), SingleLang("Todaymic", "https://todaymic.com", "en", overrideVersionCode = 1),