From 90469630d1a8a02157479810013190bd6a6525c8 Mon Sep 17 00:00:00 2001 From: Lars Date: Wed, 27 May 2015 07:01:38 +0200 Subject: [PATCH] rTorrent: Fix load commands --- .../Download/Clients/rTorrent/RTorrentProxy.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs index 027473b3c..3afb95b24 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs @@ -27,10 +27,10 @@ namespace NzbDrone.Core.Download.Clients.RTorrent object[] TorrentMulticall(params string[] parameters); [XmlRpcMethod("load.start")] - int LoadURL(string data); + int LoadURL(string target, string data); [XmlRpcMethod("load.raw_start")] - int LoadBinary(byte[] data); + int LoadBinary(string target, byte[] data); [XmlRpcMethod("d.erase")] int Remove(string hash); @@ -133,7 +133,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent var client = BuildClient(settings); - var response = client.LoadURL(torrentUrl); + var response = client.LoadURL("", torrentUrl); if (response != 0) { throw new DownloadClientException("Could not add torrent: {0}.", torrentUrl); @@ -146,7 +146,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent var client = BuildClient(settings); - var response = client.LoadBinary(fileContent); + var response = client.LoadBinary("", fileContent); if (response != 0) { throw new DownloadClientException("Could not add torrent: {0}.", fileName); @@ -194,15 +194,14 @@ namespace NzbDrone.Core.Download.Clients.RTorrent private IRTorrent BuildClient(RTorrentSettings settings) { - var url = string.Format(@"{0}://{1}:{2}/{3}", + var client = XmlRpcProxyGen.Create(); + + client.Url = string.Format(@"{0}://{1}:{2}/{3}", settings.UseSsl ? "https" : "http", settings.Host, settings.Port, settings.UrlBase); - var client = XmlRpcProxyGen.Create(); - client.Url = url; - client.EnableCompression = true; if (!settings.Username.IsNullOrWhiteSpace())