Browse Source

Only get free space on Transmission when version >= 2.20 (RPC version 12).

pull/11/head
Eric Kok 13 years ago
parent
commit
15b39c8319
  1. 2
      lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java

2
lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java

@ -156,7 +156,7 @@ public class TransmissionAdapter implements IDaemonAdapter { @@ -156,7 +156,7 @@ public class TransmissionAdapter implements IDaemonAdapter {
// Request the current server statistics
JSONObject stats = makeRequest(buildRequestObject("session-get", new JSONObject())).getJSONObject("arguments");
return new GetStatsTaskSuccessResult((GetStatsTask) task, stats.getBoolean("alt-speed-enabled"),
stats.getLong("download-dir-free-space"));
rpcVersion >= 12? stats.getLong("download-dir-free-space"): -1);
case GetTorrentDetails:

Loading…
Cancel
Save