From a91ea8182eb8a42a2f8eb15ca571c297c6e682c9 Mon Sep 17 00:00:00 2001 From: Carlos Date: Sat, 13 Oct 2018 13:46:07 -0400 Subject: [PATCH] fix images again for myreadingmanga (#549) --- src/all/myreadingmanga/build.gradle | 4 ++-- .../extension/all/myreadingmanga/MyReadingManga.kt | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/all/myreadingmanga/build.gradle b/src/all/myreadingmanga/build.gradle index 35a4d64c9..cf29e2101 100644 --- a/src/all/myreadingmanga/build.gradle +++ b/src/all/myreadingmanga/build.gradle @@ -5,8 +5,8 @@ ext { appName = 'Tachiyomi: MyReadingManga' pkgNameSuffix = 'all.myreadingmanga' extClass = '.MyReadingMangaFactory' - extVersionCode = 7 - extVersionSuffix = 6 + extVersionCode = 8 + extVersionSuffix = 7 libVersion = '1.2' } diff --git a/src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt b/src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt index 1ff8e02b2..8a14e468a 100644 --- a/src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt +++ b/src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt @@ -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")