From 32cfc959175391f0aaba4aa40f23742f5db4aba0 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Tue, 18 Nov 2014 19:52:55 +0100 Subject: [PATCH 1/3] Release time! Version 2.3.0. --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ef8a2aef..695d67fe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 19 - versionCode 216 - versionName '2.3.0-beta' + versionCode 217 + versionName '2.3.0' } signingConfigs { release { From 15bcbb03a2bbdc00175c03763e2ed7f30b4f2a57 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Fri, 16 Jan 2015 13:14:16 +0100 Subject: [PATCH 2/3] Fix always failing SSL with empty sslTrustKey --- app/src/main/java/org/transdroid/daemon/util/HttpHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java b/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java index 90a2db9e..309b4ff1 100644 --- a/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java +++ b/app/src/main/java/org/transdroid/daemon/util/HttpHelper.java @@ -130,7 +130,7 @@ public class HttpHelper { // Register http and https sockets SchemeRegistry registry = new SchemeRegistry(); SocketFactory httpsSocketFactory; - if (sslTrustKey != null) { + if (sslTrustKey != null && sslTrustKey.length() != 0) { httpsSocketFactory = new TlsSniSocketFactory(sslTrustKey); } else if (sslTrustAll) { httpsSocketFactory = new TlsSniSocketFactory(true); From eac48b16397f951d1ffcd97ffd63c7d3fccd9867 Mon Sep 17 00:00:00 2001 From: Piotr Gasior Date: Mon, 23 Feb 2015 02:22:29 +0100 Subject: [PATCH 3/3] Fix rtorrent support --- .../daemon/Rtorrent/RtorrentAdapter.java | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java b/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java index c4ad22f3..8ee42de8 100644 --- a/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java +++ b/app/src/main/java/org/transdroid/daemon/Rtorrent/RtorrentAdapter.java @@ -95,32 +95,32 @@ public class RtorrentAdapter implements IDaemonAdapter { case Retrieve: // @formatter:off - Object result = makeRtorrentCall(log,"d.multicall", - new String[] { "main", - "d.get_hash=", - "d.get_name=", - "d.get_state=", - "d.get_down_rate=", - "d.get_up_rate=", - "d.get_peers_connected=", - "d.get_peers_not_connected=", - "d.get_peers_accounted=", - "d.get_bytes_done=", - "d.get_up_total=", - "d.get_size_bytes=", - "d.get_creation_date=", - "d.get_left_bytes=", - "d.get_complete=", + Object result = makeRtorrentCall(log,"d.multicall2", + new String[] { "", "main", + "d.hash=", + "d.name=", + "d.state=", + "d.down.rate=", + "d.up.rate=", + "d.peers_connected=", + "d.peers_not_connected=", + "d.peers_accounted=", + "d.bytes_done=", + "d.up.total=", + "d.size_bytes=", + "d.creation_date=", + "d.left_bytes=", + "d.complete=", "d.is_active=", "d.is_hash_checking=", - "d.get_base_path=", - "d.get_base_filename=", - "d.get_message=", - "d.get_custom=addtime", - "d.get_custom=seedingtime", - "d.get_custom1=", - "d.get_peers_complete=", - "d.get_peers_accounted=" }); + "d.base_path=", + "d.base_filename=", + "d.message=", + "d.custom=addtime", + "d.custom=seedingtime", + "d.custom1=", + "d.peers_complete=", + "d.peers_accounted=" }); // @formatter:on return new RetrieveTaskSuccessResult((RetrieveTask) task, onTorrentsRetrieved(result), lastKnownLabels); @@ -131,7 +131,7 @@ public class RtorrentAdapter implements IDaemonAdapter { Object dresult = makeRtorrentCall(log,"t.multicall", new String[] { task.getTargetTorrent().getUniqueID(), "", - "t.get_url=" }); + "t.url=" }); // @formatter:on return new GetTorrentDetailsTaskSuccessResult((GetTorrentDetailsTask) task, onTorrentDetailsRetrieved(log, dresult)); @@ -142,13 +142,13 @@ public class RtorrentAdapter implements IDaemonAdapter { Object fresult = makeRtorrentCall(log,"f.multicall", new String[] { task.getTargetTorrent().getUniqueID(), "", - "f.get_path=", - "f.get_size_bytes=", - "f.get_priority=", - "f.get_completed_chunks=", - "f.get_size_chunks=", - "f.get_priority=", - "f.get_frozen_path=" }); + "f.path=", + "f.size_bytes=", + "f.priority=", + "f.completed_chunks=", + "f.size_chunks=", + "f.priority=", + "f.frozen_path=" }); // @formatter:on return new GetFileListTaskSuccessResult((GetFileListTask) task, onTorrentFilesRetrieved(fresult, task.getTargetTorrent())); @@ -167,22 +167,22 @@ public class RtorrentAdapter implements IDaemonAdapter { byte[] bytes = baos.toByteArray(); int size = (int) file.length() * 2; final int XMLRPC_EXTRA_PADDING = 1280; - makeRtorrentCall(log, "set_xmlrpc_size_limit", new Object[]{size + XMLRPC_EXTRA_PADDING}); - makeRtorrentCall(log, "load_raw_start", new Object[]{bytes}); + makeRtorrentCall(log, "network.xmlrpc.size_limit.set", new Object[]{size + XMLRPC_EXTRA_PADDING}); + makeRtorrentCall(log, "load.raw_start", new Object[]{bytes}); return new DaemonTaskSuccessResult(task); case AddByUrl: // Request to add a torrent by URL String url = ((AddByUrlTask) task).getUrl(); - makeRtorrentCall(log, "load_start", new String[]{url}); + makeRtorrentCall(log, "load.start", new String[]{"",url}); return new DaemonTaskSuccessResult(task); case AddByMagnetUrl: // Request to add a magnet link by URL String magnet = ((AddByMagnetUrlTask) task).getUrl(); - makeRtorrentCall(log, "load_start", new String[]{magnet}); + makeRtorrentCall(log, "load.start", new String[]{"",magnet}); return new DaemonTaskSuccessResult(task); case Remove: @@ -190,7 +190,7 @@ public class RtorrentAdapter implements IDaemonAdapter { // Remove a torrent RemoveTask removeTask = (RemoveTask) task; if (removeTask.includingData()) { - makeRtorrentCall(log, "d.set_custom5", + makeRtorrentCall(log, "d.custom5.set", new String[]{task.getTargetTorrent().getUniqueID(), "1"}); } makeRtorrentCall(log, "d.erase", new String[]{task.getTargetTorrent().getUniqueID()}); @@ -205,7 +205,7 @@ public class RtorrentAdapter implements IDaemonAdapter { case PauseAll: // Resume all torrents - makeRtorrentCall(log, "d.multicall", new String[]{"main", "d.pause="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"","main", "d.pause="}); return new DaemonTaskSuccessResult(task); case Resume: @@ -217,7 +217,7 @@ public class RtorrentAdapter implements IDaemonAdapter { case ResumeAll: // Resume all torrents - makeRtorrentCall(log, "d.multicall", new String[]{"main", "d.resume="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.resume="}); return new DaemonTaskSuccessResult(task); case Stop: @@ -229,7 +229,7 @@ public class RtorrentAdapter implements IDaemonAdapter { case StopAll: // Stop all torrents - makeRtorrentCall(log, "d.multicall", new String[]{"main", "d.stop="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.stop="}); return new DaemonTaskSuccessResult(task); case Start: @@ -241,7 +241,7 @@ public class RtorrentAdapter implements IDaemonAdapter { case StartAll: // Start all torrents - makeRtorrentCall(log, "d.multicall", new String[]{"main", "d.start="}); + makeRtorrentCall(log, "d.multicall2", new String[]{"", "main", "d.start="}); return new DaemonTaskSuccessResult(task); case SetFilePriorities: @@ -251,7 +251,7 @@ public class RtorrentAdapter implements IDaemonAdapter { String newPriority = "" + convertPriority(prioTask.getNewPriority()); // One at a time; rTorrent doesn't seem to support a multicall on a selective number of files for (TorrentFile forFile : prioTask.getForFiles()) { - makeRtorrentCall(log, "f.set_priority", + makeRtorrentCall(log, "f.priority.set", new String[]{task.getTargetTorrent().getUniqueID() + ":f" + forFile.getKey(), newPriority}); } @@ -261,16 +261,16 @@ public class RtorrentAdapter implements IDaemonAdapter { // Request to set the maximum transfer rates SetTransferRatesTask ratesTask = (SetTransferRatesTask) task; - makeRtorrentCall(log, "set_download_rate", new String[]{(ratesTask.getDownloadRate() == null ? "0" : + makeRtorrentCall(log, "throttle.global_down.max_rate.set", new String[]{"",(ratesTask.getDownloadRate() == null ? "0" : ratesTask.getDownloadRate().toString() + "k")}); - makeRtorrentCall(log, "set_upload_rate", new String[]{ + makeRtorrentCall(log, "throttle.global_up.max_rate.set", new String[]{"", (ratesTask.getUploadRate() == null ? "0" : ratesTask.getUploadRate().toString() + "k")}); return new DaemonTaskSuccessResult(task); case SetLabel: SetLabelTask labelTask = (SetLabelTask) task; - makeRtorrentCall(log, "d.set_custom1", + makeRtorrentCall(log, "d.custom1.set", new String[]{task.getTargetTorrent().getUniqueID(), labelTask.getNewLabel()}); return new DaemonTaskSuccessResult(task);