@Override
public Image getAuthorCover(String author) {
- Image custom = getCustomSourceCover(author);
+ Image custom = getCustomAuthorCover(author);
if (custom != null) {
return custom;
}
- Image cached = cacheLib.getSourceCover(author);
+ Image cached = cacheLib.getAuthorCover(author);
if (cached != null) {
return cached;
}
- return lib.getSourceCover(author);
-
+ return lib.getAuthorCover(author);
}
@Override
return custom;
}
-
+
@Override
public Image getCustomAuthorCover(String author) {
Image custom = cacheLib.getCustomAuthorCover(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;