From 1ecd11ced4b85bb1c3078aa8d7d7a1d5d287c34b Mon Sep 17 00:00:00 2001 From: E-Hern Lee Date: Fri, 4 Jun 2021 21:40:15 +1000 Subject: [PATCH] Fix MangaJar page list parsing (#7400) * fix[mangajar]: fix page list parsing * style[mangajar]: remove braces from if-expression, use hasAttr * fix[mangajar]: fix if-else --- src/en/mangajar/build.gradle | 2 +- .../src/eu/kanade/tachiyomi/extension/en/mangajar/MangaJar.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/en/mangajar/build.gradle b/src/en/mangajar/build.gradle index da59b954c..83322e6c8 100644 --- a/src/en/mangajar/build.gradle +++ b/src/en/mangajar/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'MangaJar' pkgNameSuffix = 'en.mangajar' extClass = '.MangaJar' - extVersionCode = 3 + extVersionCode = 4 libVersion = '1.2' } diff --git a/src/en/mangajar/src/eu/kanade/tachiyomi/extension/en/mangajar/MangaJar.kt b/src/en/mangajar/src/eu/kanade/tachiyomi/extension/en/mangajar/MangaJar.kt index 3eff57eae..324c6152b 100644 --- a/src/en/mangajar/src/eu/kanade/tachiyomi/extension/en/mangajar/MangaJar.kt +++ b/src/en/mangajar/src/eu/kanade/tachiyomi/extension/en/mangajar/MangaJar.kt @@ -143,7 +143,7 @@ class MangaJar : ParsedHttpSource() { override fun pageListParse(document: Document): List { return document.select("img[data-page]").mapIndexed { i, element -> - Page(i, "", element.attr("data-alternative")) + Page(i, "", if (element.hasAttr("data-src")) element.attr("abs:data-src") else element.attr("abs:src")) } }