Update nikiroo-utils, bugfixes:
[nikiroo-utils.git] / src / be / nikiroo / fanfix / supported / InfoReader.java
index 571f77b0a1cda5b08e6e775b257d9db8f27eb101..ccffd7c9d27205713cfe6e623b3a8c4c56532aac 100644 (file)
@@ -31,11 +31,11 @@ public class InfoReader {
                                in.close();
                                in = null;
                        }
-               } else {
-                       throw new FileNotFoundException(
-                                       "File given as argument does not exists: "
-                                                       + infoFile.getAbsolutePath());
                }
+
+               throw new FileNotFoundException(
+                               "File given as argument does not exists: "
+                                               + infoFile.getAbsolutePath());
        }
 
        private static MetaData createMeta(URL sourceInfoFile, InputStream in,
@@ -64,8 +64,9 @@ public class InfoReader {
                                if (info.endsWith(".info")) {
                                        info = info.substring(0, info.length() - ".info".length());
                                        String ext = "."
-                                                       + Instance.getConfig().getString(
-                                                                       Config.IMAGE_FORMAT_COVER);
+                                                       + Instance.getConfig()
+                                                                       .getString(Config.IMAGE_FORMAT_COVER)
+                                                                       .toLowerCase();
                                        meta.setCover(BasicSupport.getImage(null, sourceInfoFile,
                                                        info + ext));
                                }