e621: fix order for pools
authorNiki Roo <niki@nikiroo.be>
Sat, 18 Apr 2020 22:01:10 +0000 (00:01 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 18 Apr 2020 22:01:10 +0000 (00:01 +0200)
1  2 
src/be/nikiroo/fanfix/supported/E621.java

index f1660e18cb34a9da6373ac03e6918ccc630ff25f,de754c8b843da881bf1e34419a7491997ac8d201..de754c8b843da881bf1e34419a7491997ac8d201
@@@ -106,7 -106,11 +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>>();
                        }
                }
  
-               // They are sorted in reverse order on the website
-               Collections.reverse(urls);
                return urls;
        }