From 69d447cc799fe71306d66a495e53698f0bab77c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Aug 2015 21:18:12 +0200 Subject: [PATCH] Only return a title if an image is found --- .../net/pterodactylus/rhynodge/filters/comics/HeldentageFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/filters/comics/HeldentageFilter.java b/src/main/java/net/pterodactylus/rhynodge/filters/comics/HeldentageFilter.java index a1f1636..7081656 100644 --- a/src/main/java/net/pterodactylus/rhynodge/filters/comics/HeldentageFilter.java +++ b/src/main/java/net/pterodactylus/rhynodge/filters/comics/HeldentageFilter.java @@ -1,6 +1,7 @@ package net.pterodactylus.rhynodge.filters.comics; import static com.google.common.base.Optional.absent; +import static com.google.common.base.Optional.of; import static java.util.Collections.emptyList; import static java.util.stream.Collectors.toList; @@ -20,7 +21,7 @@ public class HeldentageFilter extends ComicSiteFilter { @Override protected Optional extractTitle(Document document) { - return absent(); + return extractImageUrls(document).isEmpty() ? absent() : of(""); } @Override -- 2.7.4