X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FWebLibraryServer.java;h=b3d897d04bbbb8bf5ecc433cd4dee280e415c7e6;hb=96e252e06064085d08e80870f8d8942348fa3c9a;hp=810cc4dbfbf6bafe532c9f2ae72fd73889a27e5e;hpb=a1226ce080a0eb9038e855fc23608e273a02b6b7;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServer.java b/src/be/nikiroo/fanfix/library/WebLibraryServer.java index 810cc4d..b3d897d 100644 --- a/src/be/nikiroo/fanfix/library/WebLibraryServer.java +++ b/src/be/nikiroo/fanfix/library/WebLibraryServer.java @@ -28,6 +28,7 @@ import be.nikiroo.utils.NanoHTTPD; import be.nikiroo.utils.NanoHTTPD.Response; import be.nikiroo.utils.NanoHTTPD.Response.Status; import be.nikiroo.utils.Progress; +import be.nikiroo.utils.Progress.ProgressListener; public class WebLibraryServer extends WebLibraryServerHtml { class WLoginResult extends LoginResult { @@ -414,6 +415,14 @@ public class WebLibraryServer extends WebLibraryServerHtml { final Progress pg = new Progress(); final String luid = lib.getNextId(); + // Keep the latest name + pg.addProgressListener(new ProgressListener() { + @Override + public void progress(Progress progress, String name) { + pg.setName(name); + } + }); + synchronized (imprts) { imprts.put(luid, pg); } @@ -422,7 +431,7 @@ public class WebLibraryServer extends WebLibraryServerHtml { @Override public void run() { try { - lib.imprt(url, pg); + lib.imprt(url, luid, pg); } catch (IOException e) { Instance.getInstance().getTraceHandler().error(e); } finally {