diff --git a/src/vi/hentaivn/build.gradle b/src/vi/hentaivn/build.gradle index b46339b3e..9cccbd792 100644 --- a/src/vi/hentaivn/build.gradle +++ b/src/vi/hentaivn/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: HentaiVN' pkgNameSuffix = 'vi.hentaivn' extClass = '.HentaiVN' - extVersionCode = 4 + extVersionCode = 5 libVersion = '1.2' } diff --git a/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt b/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt index d43be0820..5b7cfa7d4 100644 --- a/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt +++ b/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt @@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.extension.vi.hentaivn import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.* import eu.kanade.tachiyomi.source.online.ParsedHttpSource +import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.OkHttpClient import okhttp3.Request @@ -20,6 +21,7 @@ class HentaiVN : ParsedHttpSource() { override val name = "HentaiVN" override val supportsLatest = true override val client: OkHttpClient = network.cloudflareClient + override fun headersBuilder(): Headers.Builder = super.headersBuilder().add("Referer", baseUrl) private val dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH) @@ -90,11 +92,6 @@ class HentaiVN : ParsedHttpSource() { return pages } - override fun imageRequest(page: Page): Request { - val imgHeaders = headersBuilder().add("Referer", page.url).build() - return GET(page.imageUrl!!, imgHeaders) - } - override fun popularMangaFromElement(element: Element) = latestUpdatesFromElement(element) override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()