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 {
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);
}
@Override
public void run() {
try {
- lib.imprt(url, pg);
+ lib.imprt(url, luid, pg);
} catch (IOException e) {
Instance.getInstance().getTraceHandler().error(e);
} finally {