+ host = config.getString(Config.REMOTE_LIBRARY_HOST,
+ "fanfix://localhost");
+ port = config.getInteger(Config.REMOTE_LIBRARY_PORT, -1);
+ String key = config.getString(Config.REMOTE_LIBRARY_KEY);
+
+ if (!host.startsWith("http://") && !host.startsWith("https://")
+ && !host.startsWith("fanfix://")) {
+ host = "fanfix://" + host;
+ }
+
+ tracer.trace("Selecting remote library " + host + ":" + port);
+
+ if (host.startsWith("fanfix://")) {
+ lib = new RemoteLibrary(key, host, port);
+ } else {
+ lib = new WebLibrary(key, host, port);
+ }
+
+ lib = new CacheLibrary(getRemoteDir(remoteDir, host), lib,
+ uiconfig);