From 4de8b6e9a87f79d21d081ae8b666bb2eb30e5a95 Mon Sep 17 00:00:00 2001 From: Taumer Date: Sat, 11 Jun 2016 16:59:04 +0300 Subject: [PATCH] Update Mangachan address and fix loading covers after update (#347) --- .../tachiyomi/data/source/online/russian/Mangachan.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt index 18536acbe..20a83ebe8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/source/online/russian/Mangachan.kt @@ -17,7 +17,7 @@ class Mangachan(context: Context, override val id: Int) : ParsedOnlineSource(con override val name = "Mangachan" - override val baseUrl = "http://mangachan.ru" + override val baseUrl = "http://mangachan.me" override val lang: Language get() = RU @@ -32,9 +32,6 @@ class Mangachan(context: Context, override val id: Int) : ParsedOnlineSource(con manga.setUrl(it.attr("href")) manga.title = it.text() } - element.select("img").first().let { - manga.thumbnail_url = baseUrl + it.attr("src") - } } override fun popularMangaNextPageSelector() = "a:contains(Вперед)" @@ -50,11 +47,13 @@ class Mangachan(context: Context, override val id: Int) : ParsedOnlineSource(con override fun mangaDetailsParse(document: Document, manga: Manga) { val infoElement = document.select("table.mangatitle").first() val descElement = document.select("div#description").first() + val imgElement = document.select("img#cover").first() manga.author = infoElement.select("tr:eq(2) > td:eq(1)").text() manga.genre = infoElement.select("tr:eq(5) > td:eq(1)").text() manga.status = parseStatus(infoElement.select("tr:eq(4) > td:eq(1)").text()) manga.description = descElement.textNodes().first().text() + manga.thumbnail_url = baseUrl + imgElement.attr("src") } private fun parseStatus(element: String): Int {