From 14685db891961bf4071727f4a2cc9143015a2005 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Fri, 7 Oct 2022 22:50:23 -0300 Subject: [PATCH] Fix images not loading in LI. (#13756) --- multisrc/overrides/madara/izakaya/src/Izakaya.kt | 12 ++++++++++++ .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/multisrc/overrides/madara/izakaya/src/Izakaya.kt b/multisrc/overrides/madara/izakaya/src/Izakaya.kt index 7d816d413..11520c1b4 100644 --- a/multisrc/overrides/madara/izakaya/src/Izakaya.kt +++ b/multisrc/overrides/madara/izakaya/src/Izakaya.kt @@ -1,8 +1,11 @@ package eu.kanade.tachiyomi.extension.pt.izakaya import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.model.Page import okhttp3.OkHttpClient +import okhttp3.Request import java.text.SimpleDateFormat import java.util.Locale import java.util.concurrent.TimeUnit @@ -19,4 +22,13 @@ class Izakaya : Madara( .build() override val useNewChapterEndpoint = true + + override fun imageRequest(page: Page): Request { + val newHeaders = headersBuilder() + .set("Referer", page.url) + .set("Accept", "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8") + .build() + + return GET(page.imageUrl!!, newHeaders) + } } 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 a993f4789..0f8566106 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 @@ -163,7 +163,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("IsekaiScan.eu (unoriginal)", "https://isekaiscan.eu", "en", className = "IsekaiscanEu"), SingleLang("IsekaiScanManga (unoriginal)", "https://isekaiscanmanga.com", "en", className = "IsekaiScanManga", overrideVersionCode = 1), SingleLang("Its Your Right Manhua", "https://itsyourightmanhua.com", "en", className = "ItsYourRightManhua", overrideVersionCode = 2), - SingleLang("Izakaya", "https://leitorizakaya.net", "pt-BR", isNsfw = true), + SingleLang("Izakaya", "https://leitorizakaya.net", "pt-BR", isNsfw = true, overrideVersionCode = 1), SingleLang("JaiminisBox.net", "https://jaiminisbox.net", "en", className = "Jaiminisboxnet"), SingleLang("Jiangzaitoon", "https://jiangzaitoon.biz", "tr", isNsfw = true, overrideVersionCode = 1), SingleLang("Kalango Scan", "https://kalangoscan.online", "pt-BR"),