From a1d4f70db420fb3a30321e22be483d95aaac4af5 Mon Sep 17 00:00:00 2001 From: beerpsi <92439990+beerpiss@users.noreply.github.com> Date: Sat, 27 Jan 2024 11:49:44 +0700 Subject: [PATCH] Ler Manga: Filter out empty page URLs (#680) --- src/pt/lermanga/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/pt/lermanga/LerManga.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pt/lermanga/build.gradle b/src/pt/lermanga/build.gradle index ad6eb8a85..6d19648f2 100644 --- a/src/pt/lermanga/build.gradle +++ b/src/pt/lermanga/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Ler Mangá' extClass = '.LerManga' - extVersionCode = 5 + extVersionCode = 6 isNsfw = true } diff --git a/src/pt/lermanga/src/eu/kanade/tachiyomi/extension/pt/lermanga/LerManga.kt b/src/pt/lermanga/src/eu/kanade/tachiyomi/extension/pt/lermanga/LerManga.kt index c4d7b782a..99d37aa41 100644 --- a/src/pt/lermanga/src/eu/kanade/tachiyomi/extension/pt/lermanga/LerManga.kt +++ b/src/pt/lermanga/src/eu/kanade/tachiyomi/extension/pt/lermanga/LerManga.kt @@ -162,12 +162,13 @@ class LerManga : ParsedHttpSource() { .replace(PAGES_VARIABLE_REGEX, "") .substringBeforeLast(";") .let { json.decodeFromString>(it) } + .filter { it.isNotBlank() } .mapIndexed { index, imageUrl -> - Page(index, document.location(), imageUrl) + Page(index, imageUrl = imageUrl) } } - override fun imageUrlParse(document: Document) = "" + override fun imageUrlParse(document: Document) = throw UnsupportedOperationException() override fun imageRequest(page: Page): Request { val newHeaders = headersBuilder()