git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cached lib can now getStory()
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
LocalLibrary.java
diff --git
a/src/be/nikiroo/fanfix/library/LocalLibrary.java
b/src/be/nikiroo/fanfix/library/LocalLibrary.java
index 1752dc7f3e253e57586fdc0e675d380700bc31ee..d0bf61a44b30453f0972bb3c6c9b99d2588df161 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/LocalLibrary.java
+++ b/
src/be/nikiroo/fanfix/library/LocalLibrary.java
@@
-255,6
+255,15
@@
public class LocalLibrary extends BasicLibrary {
@Override
public synchronized Image getCustomAuthorCover(String author) {
@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;
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();
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);
}
});
}
});