fix custom author covers
[nikiroo-utils.git] / src / be / nikiroo / fanfix / library / LocalLibrary.java
index 1752dc7f3e253e57586fdc0e675d380700bc31ee..90e10c3024a61949762fe6a95fb30b5472e0f54c 100644 (file)
@@ -255,6 +255,15 @@ public class LocalLibrary extends BasicLibrary {
 
        @Override
        public synchronized Image getCustomAuthorCover(String author) {
+               if (authorCovers == null) {
+                       authorCovers = new HashMap<String, Image>();
+               }
+
+               Image img = authorCovers.get(author);
+               if (img != null) {
+                       return img;
+               }
+
                File cover = getAuthorCoverFile(author);
                if (cover.exists()) {
                        InputStream in;