Fix MyReadingManga covers and broken pages (fixes #425)
This commit is contained in:
parent
c498ecf902
commit
d9f7ca0673
|
@ -5,8 +5,8 @@ ext {
|
||||||
appName = 'Tachiyomi: MyReadingManga'
|
appName = 'Tachiyomi: MyReadingManga'
|
||||||
pkgNameSuffix = "all.myreadingmanga"
|
pkgNameSuffix = "all.myreadingmanga"
|
||||||
extClass = '.MyReadingMangaFactory'
|
extClass = '.MyReadingMangaFactory'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
extVersionSuffix = 3
|
extVersionSuffix = 4
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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())
|
override fun searchMangaFromElement(element: Element) = buildManga(element.select("a").first(), element.select("img").first())
|
||||||
|
|
||||||
|
|
||||||
private fun buildManga(titleElement: Element, thumbnailElement: Element): SManga {
|
private fun buildManga(titleElement: Element, thumbnailElement: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.setUrlWithoutDomain(titleElement.attr("href"))
|
manga.setUrlWithoutDomain(titleElement.attr("href"))
|
||||||
manga.title = cleanTitle(titleElement.text())
|
manga.title = cleanTitle(titleElement.text())
|
||||||
manga.thumbnail_url = getThumbnail(thumbnailElement.attr("src"))
|
manga.thumbnail_url = getThumbnail(thumbnailElement.attr("data-src"))
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,9 +136,9 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
|
||||||
override fun pageListParse(response: Response): List<Page> {
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
val body = response.asJsoup()
|
val body = response.asJsoup()
|
||||||
val pages = mutableListOf<Page>()
|
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
|
return pages
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue