Try 3
[nikiroo-utils.git] / src / be / nikiroo / fanfix / supported / E621.java
index 44621b9a79fe31ea10773dd6ca3d88b158a092e6..c57f8fd2cfbe0c565f15904cc5873a085acbb8b3 100644 (file)
@@ -58,6 +58,8 @@ class E621 extends BasicSupport_Deprecated {
                meta.setCover(getCover(source, reset(in)));
                meta.setFakeCover(true);
 
+               System.out.println("Meta from e621: "+meta);
+               
                return meta;
        }
 
@@ -130,12 +132,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("<br/>");
                        if (pos >= 0) {