From 49d0e06704b60fab42acb149f29e8052478c2560 Mon Sep 17 00:00:00 2001 From: len Date: Wed, 4 Jan 2017 19:12:47 +0100 Subject: [PATCH] Replace bad image url with the logo in mangafox. Related with #626 --- .../tachiyomi/data/source/online/english/Mangafox.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt index c98cd4692..70e2ce334 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/english/Mangafox.kt @@ -137,7 +137,14 @@ class Mangafox(override val id: Int) : ParsedOnlineSource() { override fun pageListParse(document: Document, pages: MutableList) { } - override fun imageUrlParse(document: Document) = document.getElementById("image").attr("src") + override fun imageUrlParse(document: Document): String { + val url = document.getElementById("image").attr("src") + return if ("compressed?token=" !in url) { + url + } else { + "http://mangafox.me/media/logo.png" + } + } private data class ListValue(val name: String, val value: String) { override fun toString(): String = name