From: Niki Roo Date: Sun, 3 Mar 2019 17:39:40 +0000 (+0100) Subject: remote: fix 30s timeout bug X-Git-Tag: fanfix-1.8.1~1 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=652fd9b0430ec27a57e0af63dba63a63afdae712;p=fanfix.git remote: fix 30s timeout bug --- diff --git a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java index c0b0506..8d24c9f 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java @@ -92,7 +92,7 @@ public class RemoteLibraryServer extends ServerObject { } } - String trace = "[" + command + "] "; + String trace = "[ " + command + "] "; for (Object arg : args) { trace += arg + " "; } @@ -107,7 +107,7 @@ public class RemoteLibraryServer extends ServerObject { Object rep = doRequest(action, command, args); getTraceHandler().trace( - String.format("[/%s]: %d ms", command, + String.format("[>%s]: %d ms", command, (new Date().getTime() - start))); return rep; @@ -123,6 +123,7 @@ public class RemoteLibraryServer extends ServerObject { Progress pg = createPgForwarder(action); List metas = new ArrayList(); + for (MetaData meta : Instance.getLibrary().getMetas(pg)) { MetaData light; if (meta.getCover() == null) { @@ -330,9 +331,10 @@ public class RemoteLibraryServer extends ServerObject { Instance.getTraceHandler().error(e); } - isDoneForwarded[0] = pg.isDone(); lastTime[0] = new Date().getTime(); } + + isDoneForwarded[0] = (pg.getProgress() >= pg.getMax()); } });