From: David ‘Bombe’ Roden Date: Sun, 20 Sep 2020 11:22:49 +0000 (+0200) Subject: 🚸 Only fail a comic state if there are no strips X-Git-Tag: v2~87 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a5d3f9dedbde55a896f40747c0549c5d17ac6e67;p=rhynodge.git 🚸 Only fail a comic state if there are no strips --- 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) : "";