e621: better title
authorNiki Roo <niki@nikiroo.be>
Fri, 1 May 2020 11:05:46 +0000 (13:05 +0200)
committerNiki Roo <niki@nikiroo.be>
Fri, 1 May 2020 11:05:46 +0000 (13:05 +0200)
src/be/nikiroo/fanfix/supported/E621.java

index c3a261bd78af518da82b9b72c40eb088a2161026..602cd36309250e03de7291c4f46784b7171ccc93 100644 (file)
@@ -186,7 +186,7 @@ class E621 extends BasicSupport {
                                }
                                source = new URL(base + "/pools/" + poolNumber);
                        } catch (NumberFormatException e) {
-                               // Not a simple ppol, skip
+                               // Not a simple pool, skip
                        } catch (MalformedURLException e) {
                                // Cannot happen
                        }
@@ -247,19 +247,19 @@ class E621 extends BasicSupport {
                        title = el.text().trim();
                }
 
-               for (String s : new String[] { "e621", "-", "e621" }) {
+               for (String s : new String[] { "e621", "-", "e621", "Pool", "-" }) {
                        if (title.startsWith(s)) {
                                title = title.substring(s.length()).trim();
                        }
                        if (title.endsWith(s)) {
                                title = title.substring(0, title.length() - s.length()).trim();
                        }
-
                }
 
                if (isSearchOrSet(getSource())) {
                        title = title.isEmpty() ? "e621" : "[e621] " + title;
                }
+               
                return title;
        }