opening html files was not OK anymore
[fanfix.git] / src / be / nikiroo / fanfix / library / LocalLibrary.java
index 1752dc7f3e253e57586fdc0e675d380700bc31ee..d0bf61a44b30453f0972bb3c6c9b99d2588df161 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;
@@ -614,7 +623,8 @@ public class LocalLibrary extends BasicLibrary {
                                boolean info = file != null && file.isFile()
                                                && file.getPath().toLowerCase().endsWith(".info");
                                boolean dir = file != null && file.isDirectory();
-                               return info || dir;
+                               boolean isExpandedHtml = new File(file, "index.html").isFile();
+                               return info || (dir && !isExpandedHtml);
                        }
                });