From: Niki Roo Date: Fri, 10 Aug 2018 13:52:21 +0000 (+0200) Subject: e621: searches: add cover (first image) X-Git-Tag: fanfix-1.8.0~16 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=678390e0f81b5337bd20ec59df9cf75bff9824e9;p=fanfix.git e621: searches: add cover (first image) --- 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) {