merge from master
[fanfix.git] / library / WebLibrary.java
index ac1349e7ac51b3015050a4725a28265ef13a211a..42f7ea5ccadd4eb40d6b86cfd1f6842abab0db50 100644 (file)
@@ -309,6 +309,9 @@ public class WebLibrary extends BasicLibrary {
                                try {
                                        subPg = JsonIO.toProgress(
                                                        new JSONObject(IOUtils.readSmallStream(in)));
+                                       pg.setName(subPg.getName());
+                                       pg.setMinMax(subPg.getMin(), subPg.getMax());
+                                       pg.setProgress(subPg.getProgress());
                                } catch (Exception e) {
                                        subPg = null;
                                } finally {
@@ -353,6 +356,11 @@ public class WebLibrary extends BasicLibrary {
                }
        }
 
+       @Override
+       public synchronized void delete(String luid) throws IOException {
+               post(WebLibraryUrls.getDeleteUrlStory(luid), null).close();
+       }
+
        @Override
        protected void updateInfo(MetaData meta) {
                // Will be taken care of directly server side