From 15b39c83199dbd4933024024091ce2964ec9aa31 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Mon, 27 Feb 2012 11:15:38 +0100 Subject: [PATCH] Only get free space on Transmission when version >= 2.20 (RPC version 12). --- .../org/transdroid/daemon/Transmission/TransmissionAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java b/lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java index 174487a5..cd6b8ba6 100644 --- a/lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java +++ b/lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java @@ -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: