X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FRemoteLibrary.java;h=f1ff214d5671f3cf52bc4a82e1472a2d9b9e414f;hb=763039108ad2d854b1c6b7bd18e8e18b08daed25;hp=e7b98282b422786eb95a077056a987039984cbfd;hpb=fb25273cf02653ac343d5437083b1bc41af5ce23;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index e7b9828..f1ff214 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -81,12 +81,12 @@ public class RemoteLibrary extends BasicLibrary { public RemoteLibrary(String key, String host, int port) { int index = -1; if (key != null) { - key.indexOf('|'); + index = key.indexOf('|'); } if (index >= 0) { - this.key = key.substring(index + 1); - this.subkey = key.substring(0, index); + this.key = key.substring(0, index); + this.subkey = key.substring(index + 1); } else { this.key = key; this.subkey = ""; @@ -143,11 +143,11 @@ public class RemoteLibrary extends BasicLibrary { @Override protected void onError(Exception e) { - // if (e instanceof SSLException) { - result[0] = Status.UNAUTHORIZED; - // } else { - // result[0] = Status.UNAVAILABLE; - // } + if (e instanceof SSLException) { + result[0] = Status.UNAUTHORIZED; + } else { + result[0] = Status.UNAVAILABLE; + } } }.connect(); } catch (UnknownHostException e) {