Version 1.2.1: fixes for GUI, new buttons
[fanfix.git] / src / be / nikiroo / fanfix / reader / LocalReader.java
index 7c50b033444d8c740b4a973dc1512b4354ab3ab1..b43473707796f819259df4bf320198d09e749dbd 100644 (file)
@@ -104,6 +104,19 @@ class LocalReader extends BasicReader {
                return file;
        }
 
+       /**
+        * Check if the {@link Story} denoted by this Library UID is present in the
+        * {@link LocalReader} cache.
+        * 
+        * @param luid
+        *            the Library UID
+        * 
+        * @return TRUE if it is
+        */
+       public boolean isCached(String luid) {
+               return lib.getInfo(luid) != null;
+       }
+
        @Override
        public void start(String type) {
                final String typeFinal = type;
@@ -114,4 +127,13 @@ class LocalReader extends BasicReader {
                        }
                });
        }
+
+       void refresh(String luid) {
+               lib.delete(luid);
+       }
+
+       void delete(String luid) {
+               lib.delete(luid);
+               Instance.getLibrary().delete(luid);
+       }
 }