X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FBasicLibrary.java;h=56a57070b0e2ab66fb0d78d97a43c847ed2cc06d;hb=9e2fad3600cd08eca73d45cb5c991d98095842aa;hp=a9b6ef3b1e19e0c259a49d136311605e19c1fa85;hpb=88664350f0b3849538d4f41f7c3d56d81d03e1a4;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/BasicLibrary.java b/src/be/nikiroo/fanfix/library/BasicLibrary.java index a9b6ef3..56a5707 100644 --- a/src/be/nikiroo/fanfix/library/BasicLibrary.java +++ b/src/be/nikiroo/fanfix/library/BasicLibrary.java @@ -353,9 +353,9 @@ abstract public class BasicLibrary { .getType()); URL url = file.toURI().toURL(); if (type != null) { -System.out.println("selected support: "+BasicSupport.getSupport(type, url)); story = BasicSupport.getSupport(type, url) // .process(pgProcess); + // Because we do not want to clear the meta cache: meta.setCover(story.getMeta().getCover()); story.setMeta(meta); @@ -519,6 +519,9 @@ System.out.println("selected support: "+BasicSupport.getSupport(type, url)); 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); @@ -537,6 +540,10 @@ System.out.println("selected support: "+BasicSupport.getSupport(type, url)); updateInfo(story.getMeta()); + Instance.getTraceHandler().trace( + this.getClass().getSimpleName() + ": story saved (" + luid + + ")"); + return story; } @@ -550,8 +557,15 @@ System.out.println("selected support: "+BasicSupport.getSupport(type, url)); * 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 + + ")"); } /**