e621: fix order for pools
authorNiki Roo <niki@nikiroo.be>
Sat, 18 Apr 2020 21:59:31 +0000 (23:59 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 18 Apr 2020 21:59:31 +0000 (23:59 +0200)
src/be/nikiroo/fanfix/supported/E621.java

index f1660e18cb34a9da6373ac03e6918ccc630ff25f..de754c8b843da881bf1e34419a7491997ac8d201 100644 (file)
@@ -106,7 +106,11 @@ class E621 extends BasicSupport {
                } else if (isSearchOrSet(getSource())) {
                        String baseUrl = "https://e621.net/posts/?page=";
                        String search = "&tags=" + getTagsFromUrl(getSource());
-                       return getChapters(getSource(), pg, baseUrl, search);
+                       // sets are sorted in reverse order on the website
+                       List<Entry<String, URL>> urls = getChapters(getSource(), pg,
+                                       baseUrl, search);
+                       Collections.reverse(urls);
+                       return urls;
                }
 
                return new LinkedList<Entry<String, URL>>();
@@ -137,8 +141,6 @@ class E621 extends BasicSupport {
                        }
                }
 
-               // They are sorted in reverse order on the website
-               Collections.reverse(urls);
                return urls;
        }