Browse Source

Fixed BitFlu connections with empty folder configuration.

pull/82/head
Eric Kok 11 years ago
parent
commit
4c07d34ec1
  1. 1
      .gitignore
  2. BIN
      core/libs/transdroid-connect.jar
  3. 7
      lib/src/org/transdroid/daemon/Bitflu/BitfluAdapter.java

1
.gitignore vendored

@ -19,3 +19,4 @@ local.properties @@ -19,3 +19,4 @@ local.properties
# Eclipse project files
.classpath
.project
.settings/

BIN
core/libs/transdroid-connect.jar

Binary file not shown.

7
lib/src/org/transdroid/daemon/Bitflu/BitfluAdapter.java

@ -76,7 +76,6 @@ public class BitfluAdapter implements IDaemonAdapter { @@ -76,7 +76,6 @@ public class BitfluAdapter implements IDaemonAdapter {
private static final String RPC_TORRENT_FILES = "showfiles-ext/";
private static final String RPC_START_DOWNLOAD = "startdownload/";
private String webuiroot = "";
private DaemonSettings settings;
private DefaultHttpClient httpclient;
@ -272,9 +271,6 @@ public class BitfluAdapter implements IDaemonAdapter { @@ -272,9 +271,6 @@ public class BitfluAdapter implements IDaemonAdapter {
private void initialise() throws DaemonException {
httpclient = HttpHelper.createStandardHttpClient(settings, true);
if(settings != null) {
webuiroot = settings.getFolder();
}
}
/**
@ -282,6 +278,9 @@ public class BitfluAdapter implements IDaemonAdapter { @@ -282,6 +278,9 @@ public class BitfluAdapter implements IDaemonAdapter {
* @return The URL of the RPC API
*/
private String buildWebUIUrl() {
String webuiroot = "";
if (settings.getFolder() != null)
webuiroot = settings.getFolder();
return (settings.getSsl() ? "https://" : "http://") + settings.getAddress() + ":" + settings.getPort() + webuiroot + "/";
}

Loading…
Cancel
Save