e621: searches: add cover (first image)
[fanfix.git] / src / be / nikiroo / fanfix / library / LocalLibrary.java
index 5e0ad40097f8add91f78d73cf1cf61b3334c53e7..275926cd93164788258381b094fcef594cde7bbf 100644 (file)
@@ -20,7 +20,6 @@ import be.nikiroo.fanfix.output.InfoCover;
 import be.nikiroo.fanfix.supported.InfoReader;
 import be.nikiroo.utils.IOUtils;
 import be.nikiroo.utils.Image;
-import be.nikiroo.utils.MarkableFileInputStream;
 import be.nikiroo.utils.Progress;
 
 /**
@@ -205,7 +204,7 @@ public class LocalLibrary extends BasicLibrary {
        @Override
        public void setSourceCover(String source, String luid) {
                sourceCovers.put(source, getCover(luid));
-               File cover = new File(getExpectedDir(source), ".cover.png");
+               File cover = new File(getExpectedDir(source), ".cover");
                try {
                        Instance.getCache().saveAsImage(sourceCovers.get(source), cover,
                                        true);
@@ -468,10 +467,8 @@ public class LocalLibrary extends BasicLibrary {
                                                                // not normal!!
                                                                throw new IOException(
                                                                                "Cannot understand the LUID of "
-                                                                                               + infoFile
-                                                                                               + ": "
-                                                                                               + (meta == null ? "[meta is NULL]"
-                                                                                                               : meta.getLuid()), e);
+                                                                                               + infoFile + ": "
+                                                                                               + meta.getLuid(), e);
                                                        }
                                                } catch (IOException e) {
                                                        // We should not have not-supported files in the
@@ -519,7 +516,7 @@ public class LocalLibrary extends BasicLibrary {
         */
        void setSourceCover(String source, Image coverImage) {
                sourceCovers.put(source, coverImage);
-               File cover = new File(getExpectedDir(source), ".cover.png");
+               File cover = new File(getExpectedDir(source), ".cover");
                try {
                        Instance.getCache().saveAsImage(sourceCovers.get(source), cover,
                                        true);