From: Niki Roo Date: Sun, 28 Apr 2019 17:51:07 +0000 (+0200) Subject: remote string -> stream + encrypt X-Git-Tag: fanfix-3.0.0~69^2 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=a0565636356ec3cd0154397215eb38ea4400df0a;p=fanfix.git remote string -> stream + encrypt --- diff --git a/changelog-fr.md b/changelog-fr.md index cc5632b..8980fad 100644 --- a/changelog-fr.md +++ b/changelog-fr.md @@ -9,8 +9,9 @@ - gui: correction pour le focus - MangaLEL: site web changé - search: supporte MangaLEL -- remote: passage en CLEAR TEXT parce que Google et Android n'aiment pas le SSL anonyme +- remote: changement du chiffrement because Google - remote: incompatible avec 2.x +- remote: perfs et utilisation de la mémoire améliorées # Version 2.0.2 diff --git a/changelog.md b/changelog.md index 1e2dc0d..e8698ef 100644 --- a/changelog.md +++ b/changelog.md @@ -9,8 +9,9 @@ - gui: focus fix - MangaLEL: website has changed - search: MangaLEL support -- remote: go CLEAR TEXT because Google and Android don't like anonymous SSL +- remote: encryption mode changed because Google - remote: not compatible with 2.x +- remote: better perfs and memory usage # Version 2.0.2 diff --git a/libs/nikiroo-utils-4.7.2-dev-sources.jar b/libs/nikiroo-utils-4.7.2-dev-sources.jar index 9ce0b0e..de70676 100644 Binary files a/libs/nikiroo-utils-4.7.2-dev-sources.jar and b/libs/nikiroo-utils-4.7.2-dev-sources.jar differ diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index c2ed310..d6bdd15 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -14,7 +14,6 @@ import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.data.Story; import be.nikiroo.utils.Image; import be.nikiroo.utils.Progress; -import be.nikiroo.utils.Version; import be.nikiroo.utils.serial.server.ConnectActionClientObject; /** @@ -61,7 +60,7 @@ public class RemoteLibrary extends BasicLibrary { Instance.getTraceHandler().trace("Getting remote lib status..."); new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Object rep = send(new Object[] { "PING" }); if ("PONG".equals(rep)) { @@ -99,7 +98,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Object rep = send(new Object[] { "GET_COVER", luid }); result[0] = (Image) rep; } @@ -138,7 +137,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Object rep = send(new Object[] { "GET_CUSTOM_COVER", type, source }); result[0] = (Image) rep; @@ -169,7 +168,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Progress pg = pgF; if (pg == null) { pg = new Progress(); @@ -230,7 +229,7 @@ public class RemoteLibrary extends BasicLibrary { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Progress pg = pgF; if (story.getMeta().getWords() <= Integer.MAX_VALUE) { pg.setMinMax(0, (int) story.getMeta().getWords()); @@ -280,7 +279,7 @@ public class RemoteLibrary extends BasicLibrary { public synchronized void delete(final String luid) throws IOException { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { send(new Object[] { "DELETE_STORY", luid }); } @@ -312,7 +311,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { send(new Object[] { "SET_COVER", type, value, luid }); } @@ -357,7 +356,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Progress pg = pgF; Object rep = send(new Object[] { "IMPORT", url.toString() }); @@ -409,7 +408,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Progress pg = pgF; Object rep = send(new Object[] { "CHANGE_STA", luid, @@ -451,7 +450,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { send(new Object[] { "EXIT" }); } @@ -535,7 +534,7 @@ public class RemoteLibrary extends BasicLibrary { try { new ConnectActionClientObject(host, port, key) { @Override - public void action(Version serverVersion) throws Exception { + public void action() throws Exception { Progress pg = pgF; if (pg == null) { pg = new Progress(); diff --git a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java index c2edeb3..72f4e83 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java @@ -16,7 +16,6 @@ import be.nikiroo.fanfix.data.Story; import be.nikiroo.utils.Progress; import be.nikiroo.utils.Progress.ProgressListener; import be.nikiroo.utils.StringUtils; -import be.nikiroo.utils.Version; import be.nikiroo.utils.serial.server.ConnectActionServerObject; import be.nikiroo.utils.serial.server.ServerObject; @@ -70,8 +69,8 @@ public class RemoteLibraryServer extends ServerObject { } @Override - protected Object onRequest(ConnectActionServerObject action, - Version clientVersion, Object data) throws Exception { + protected Object onRequest(ConnectActionServerObject action, Object data) + throws Exception { long start = new Date().getTime(); String command = "";