🚸 Only fail a comic state if there are no strips
[rhynodge.git] / src / main / java / net / pterodactylus / rhynodge / filters / ComicSiteFilter.java
index 19286a6..818f711 100644 (file)
@@ -57,12 +57,12 @@ public abstract class ComicSiteFilter implements Filter {
                List<String> 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) : "";