fix remote default covers
[fanfix.git] / src / be / nikiroo / fanfix / library / CacheLibrary.java
index 8b1a3c7e65ea570bf01407f73dea984956cadc97..a550740bafa7a9105d271ef9dd7df53515651d6e 100644 (file)
@@ -117,7 +117,12 @@ public class CacheLibrary extends BasicLibrary {
                        return custom;
                }
 
-               return cacheLib.getSourceCover(source);
+               Image cached = cacheLib.getSourceCover(source);
+               if (cached != null) {
+                       return cached;
+               }
+
+               return lib.getSourceCover(source);
        }
 
        @Override
@@ -249,6 +254,9 @@ public class CacheLibrary extends BasicLibrary {
 
        /**
         * Clear the {@link Story} from the cache.
+        * <p>
+        * The next time we try to retrieve the {@link Story}, it may be required to
+        * cache it again.
         * 
         * @param luid
         *            the story to clear