From a5d3f9dedbde55a896f40747c0549c5d17ac6e67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 20 Sep 2020 13:22:49 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=9A=B8=20Only=20fail=20a=20comic=20state?= =?utf8?q?=20if=20there=20are=20no=20strips?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java b/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java index 19286a6..818f711 100644 --- a/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java +++ b/src/main/java/net/pterodactylus/rhynodge/filters/ComicSiteFilter.java @@ -57,12 +57,12 @@ public abstract class ComicSiteFilter implements Filter { List imageComments = extractImageComments(htmlState.document()); /* store comic, if found, into state. */ - if (!title.isPresent() || imageUrls.isEmpty()) { + if (imageUrls.isEmpty()) { return new FailedState(); } ComicState comicState = new ComicState(); - Comic comic = new Comic(title.get()); + Comic comic = new Comic(title.or("")); int imageCounter = 0; for (String imageUrl : imageUrls) { String imageComment = (imageCounter < imageComments.size()) ? imageComments.get(imageCounter) : ""; -- 2.7.4