fix images again for myreadingmanga (#549)

This commit is contained in:
Carlos 2018-10-13 13:46:07 -04:00 committed by GitHub
parent d5a2e77244
commit a91ea8182e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

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

View File

@ -69,7 +69,13 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
val manga = SManga.create()
manga.setUrlWithoutDomain(titleElement.attr("href"))
manga.title = cleanTitle(titleElement.text())
manga.thumbnail_url = getThumbnail(thumbnailElement.attr("data-src"))
manga.thumbnail_url =
when {
thumbnailElement.attr("data-src").endsWith(".jpg") -> getThumbnail(thumbnailElement.attr("data-src"))
thumbnailElement.attr("src").endsWith(".jpg") -> getThumbnail(thumbnailElement.attr("src"))
else -> getThumbnail(thumbnailElement.attr("data-lazy-src"))
}
return manga
}
@ -80,8 +86,6 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
private fun cleanTitle(title: String) = title.substringBeforeLast("[").substringAfterLast("]").substringBeforeLast("(")
override fun searchMangaNextPageSelector() = null
override fun mangaDetailsParse(document: Document): SManga {
val manga = SManga.create()
manga.author = document.select(".entry-content p")?.find { it ->
@ -129,6 +133,9 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
return chapter
}
override fun searchMangaNextPageSelector() = null
override fun chapterFromElement(element: Element) = throw Exception("Not used")