From 678390e0f81b5337bd20ec59df9cf75bff9824e9 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 10 Aug 2018 15:52:21 +0200 Subject: [PATCH] e621: searches: add cover (first image) --- src/be/nikiroo/fanfix/supported/E621.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/be/nikiroo/fanfix/supported/E621.java b/src/be/nikiroo/fanfix/supported/E621.java index 44621b9..407ec70 100644 --- a/src/be/nikiroo/fanfix/supported/E621.java +++ b/src/be/nikiroo/fanfix/supported/E621.java @@ -130,12 +130,12 @@ class E621 extends BasicSupport_Deprecated { } private Image getCover(URL source, InputStream in) throws IOException { - // No cover on searches (/post/) - if (isSearch(source)) - return null; + URL urlForCover = source; + if (isPool(source)) { + urlForCover = new URL(source.toString() + "?page=1"); + } - String images = getChapterContent(new URL(source.toString() + "?page=" - + 1), in, 1, null); + String images = getChapterContent(urlForCover, in, 1, null); if (!images.isEmpty()) { int pos = images.indexOf("
"); if (pos >= 0) { -- 2.27.0