Albirew/tachiyomi
Archivé
1
0
Bifurcation 0

Update Mangachan address and fix loading covers after update (#347)

Cette révision appartient à :
Taumer 2016-06-11 16:59:04 +03:00 révisé par Bram van de Kerkhof
Parent e79d536f33
révision 4de8b6e9a8

Voir le fichier

@ -17,7 +17,7 @@ class Mangachan(context: Context, override val id: Int) : ParsedOnlineSource(con
override val name = "Mangachan" override val name = "Mangachan"
override val baseUrl = "http://mangachan.ru" override val baseUrl = "http://mangachan.me"
override val lang: Language get() = RU 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.setUrl(it.attr("href"))
manga.title = it.text() manga.title = it.text()
} }
element.select("img").first().let {
manga.thumbnail_url = baseUrl + it.attr("src")
}
} }
override fun popularMangaNextPageSelector() = "a:contains(Вперед)" 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) { override fun mangaDetailsParse(document: Document, manga: Manga) {
val infoElement = document.select("table.mangatitle").first() val infoElement = document.select("table.mangatitle").first()
val descElement = document.select("div#description").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.author = infoElement.select("tr:eq(2) > td:eq(1)").text()
manga.genre = infoElement.select("tr:eq(5) > 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.status = parseStatus(infoElement.select("tr:eq(4) > td:eq(1)").text())
manga.description = descElement.textNodes().first().text() manga.description = descElement.textNodes().first().text()
manga.thumbnail_url = baseUrl + imgElement.attr("src")
} }
private fun parseStatus(element: String): Int { private fun parseStatus(element: String): Int {