Better URL entries + fix for FimFicAPI:
[fanfix.git] / src / be / nikiroo / fanfix / supported / Fimfiction.java
index ed9c9adf867439cd3154d3f6d00f0e5d30479403..792f66baf11e1423287d4138b07c8f2fca95ef51 100644 (file)
@@ -4,6 +4,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.AbstractMap;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -47,7 +48,7 @@ class Fimfiction extends BasicSupport_Deprecated {
                meta.setPublisher(getSourceName());
                meta.setUuid(source.toString());
                meta.setLuid("");
-               meta.setLang("EN");
+               meta.setLang("en");
                meta.setSubject("MLP");
                meta.setType(getType().toString());
                meta.setImageDocument(false);
@@ -231,25 +232,8 @@ class Fimfiction extends BasicSupport_Deprecated {
                                        }
 
                                        try {
-                                               final String key = name;
-                                               final URL value = new URL("http://www.fimfiction.net"
-                                                               + line);
-                                               urls.add(new Entry<String, URL>() {
-                                                       @Override
-                                                       public URL setValue(URL value) {
-                                                               return null;
-                                                       }
-
-                                                       @Override
-                                                       public String getKey() {
-                                                               return key;
-                                                       }
-
-                                                       @Override
-                                                       public URL getValue() {
-                                                               return value;
-                                                       }
-                                               });
+                                               urls.add(new AbstractMap.SimpleEntry<String, URL>(name,
+                                                               new URL("http://www.fimfiction.net" + line)));
                                        } catch (MalformedURLException e) {
                                                Instance.getTraceHandler().error(e);
                                        }