From 652fd9b0430ec27a57e0af63dba63a63afdae712 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 3 Mar 2019 18:39:40 +0100 Subject: [PATCH] remote: fix 30s timeout bug --- src/be/nikiroo/fanfix/library/RemoteLibraryServer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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()); } }); -- 2.27.0