remote/general: import should not retrieve story from server
[nikiroo-utils.git] / src / be / nikiroo / fanfix / library / CacheLibrary.java
index 019acd210d1fb3b2263db468e2c21e6e6bfd1d69..e128da525b6616befc61a5917119a3e70f1e2b26 100644 (file)
@@ -345,7 +345,7 @@ public class CacheLibrary extends BasicLibrary {
        }
 
        @Override
-       public Story imprt(URL url, Progress pg) throws IOException {
+       public MetaData imprt(URL url, Progress pg) throws IOException {
                if (pg == null) {
                        pg = new Progress();
                }
@@ -356,13 +356,13 @@ public class CacheLibrary extends BasicLibrary {
                pg.addProgress(pgImprt, 7);
                pg.addProgress(pgCache, 3);
 
-               Story story = lib.imprt(url, pgImprt);
-               cacheLib.save(story, story.getMeta().getLuid(), pgCache);
-
-               updateInfo(story.getMeta());
+               MetaData meta = lib.imprt(url, pgImprt);
+               updateInfo(meta);
+               
+               clearFromCache(meta.getLuid());
 
                pg.done();
-               return story;
+               return meta;
        }
 
        // All the following methods are only used by Save and Delete in