Fixes:
[nikiroo-utils.git] / src / be / nikiroo / fanfix / library / BasicLibrary.java
index e62416bcca9fd1112bbf8ade0175dc008dcd142d..56a57070b0e2ab66fb0d78d97a43c847ed2cc06d 100644 (file)
@@ -355,8 +355,7 @@ abstract public class BasicLibrary {
                                        if (type != null) {
                                                story = BasicSupport.getSupport(type, url) //
                                                                .process(pgProcess);
-                                               System.out.println("orig meta: "+meta);
-                                               System.out.println("story retrieved: "+story);
+
                                                // Because we do not want to clear the meta cache:
                                                meta.setCover(story.getMeta().getCover());
                                                story.setMeta(meta);
@@ -520,6 +519,9 @@ abstract public class BasicLibrary {
        public synchronized Story save(Story story, String luid, Progress pg)
                        throws IOException {
 
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": saving story " + luid);
+
                // Do not change the original metadata, but change the original story
                MetaData meta = story.getMeta().clone();
                story.setMeta(meta);
@@ -538,6 +540,10 @@ abstract public class BasicLibrary {
 
                updateInfo(story.getMeta());
 
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": story saved (" + luid
+                                               + ")");
+
                return story;
        }
 
@@ -551,8 +557,15 @@ abstract public class BasicLibrary {
         *             in case of I/O error
         */
        public synchronized void delete(String luid) throws IOException {
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": deleting story " + luid);
+
                doDelete(luid);
                deleteInfo(luid);
+
+               Instance.getTraceHandler().trace(
+                               this.getClass().getSimpleName() + ": story deleted (" + luid
+                                               + ")");
        }
 
        /**