From a472bf5c04dd330be5b60845b255ab64dbc951f4 Mon Sep 17 00:00:00 2001 From: mobi2002 <48650614+mobi2002@users.noreply.github.com> Date: Mon, 6 Feb 2023 15:16:28 +0500 Subject: [PATCH] Night Scans: add referer (#15238) --- .../overrides/mangathemesia/nightscans/src/NightScans.kt | 6 +++++- .../multisrc/mangathemesia/MangaThemesiaGenerator.kt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/multisrc/overrides/mangathemesia/nightscans/src/NightScans.kt b/multisrc/overrides/mangathemesia/nightscans/src/NightScans.kt index 10e4888e7..025c679e9 100644 --- a/multisrc/overrides/mangathemesia/nightscans/src/NightScans.kt +++ b/multisrc/overrides/mangathemesia/nightscans/src/NightScans.kt @@ -1,5 +1,9 @@ package eu.kanade.tachiyomi.extension.en.nightscans import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import okhttp3.Headers -class NightScans : MangaThemesia("NIGHT SCANS", "https://nightscans.org", "en", "/series") +class NightScans : MangaThemesia("NIGHT SCANS", "https://nightscans.org", "en", "/series") { + override fun headersBuilder(): Headers.Builder = super.headersBuilder() + .add("Referer", baseUrl) +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index ccb09f414..3f1cb9a9a 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -82,7 +82,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("Mundo Mangá-Kun", "https://mundomangakun.com.br", "pt-BR", className = "MundoMangaKun", isNsfw = true), SingleLang("Nekomik", "https://nekomik.com", "id"), SingleLang("Ngomik", "https://ngomik.net", "id", overrideVersionCode = 2), - SingleLang("NIGHT SCANS", "https://nightscans.org", "en", isNsfw = true, className = "NightScans"), + SingleLang("NIGHT SCANS", "https://nightscans.org", "en", isNsfw = true, className = "NightScans", overrideVersionCode = 1), SingleLang("Nocturnal Scans", "https://nocturnalscans.com", "en", overrideVersionCode = 1), SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true), SingleLang("Origami Orpheans", "https://origami-orpheans.com.br", "pt-BR", overrideVersionCode = 9),