Fix MyReadingManga covers and broken pages (fixes #425) (#431)

Fix MyReadingManga covers and broken pages (fixes #425)
This commit is contained in:
Eugene 2018-08-03 21:30:29 -04:00 committed by Carlos
parent c498ecf902
commit d9f7ca0673
2 changed files with 5 additions and 6 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: MyReadingManga'
pkgNameSuffix = "all.myreadingmanga"
extClass = '.MyReadingMangaFactory'
extVersionCode = 4
extVersionSuffix = 3
extVersionCode = 5
extVersionSuffix = 4
libVersion = '1.2'
}

View File

@ -65,12 +65,11 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
override fun searchMangaFromElement(element: Element) = buildManga(element.select("a").first(), element.select("img").first())
private fun buildManga(titleElement: Element, thumbnailElement: Element): SManga {
val manga = SManga.create()
manga.setUrlWithoutDomain(titleElement.attr("href"))
manga.title = cleanTitle(titleElement.text())
manga.thumbnail_url = getThumbnail(thumbnailElement.attr("src"))
manga.thumbnail_url = getThumbnail(thumbnailElement.attr("data-src"))
return manga
}
@ -137,9 +136,9 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
override fun pageListParse(response: Response): List<Page> {
val body = response.asJsoup()
val pages = mutableListOf<Page>()
val elements = body.select("div.separator noscript img")
val elements = body.select("div.separator > img")
(0 until elements.size).mapTo(pages) { Page(it, "", elements[it].attr("src")) }
(0 until elements.size).mapTo(pages) { Page(it, "", elements[it].attr("data-src")) }
return pages
}