mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-08 12:43:19 +02:00
Fixed: (Deluge) Set seed limits in client
This commit is contained in:
parent
ed1fb58242
commit
da75519524
4 changed files with 13 additions and 9 deletions
|
|
@ -38,8 +38,10 @@ protected override string AddFromMagnetLink(TorrentInfo release, string hash, st
|
|||
throw new DownloadClientException("Deluge failed to add magnet " + magnetLink);
|
||||
}
|
||||
|
||||
// _proxy.SetTorrentSeedingConfiguration(actualHash, remoteMovie.SeedConfiguration, Settings);
|
||||
_proxy.SetTorrentSeedingConfiguration(actualHash, release.SeedConfiguration, Settings);
|
||||
|
||||
var category = GetCategoryForRelease(release) ?? Settings.Category;
|
||||
|
||||
if (category.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
_proxy.SetTorrentLabel(actualHash, category, Settings);
|
||||
|
|
@ -62,8 +64,10 @@ protected override string AddFromTorrentFile(TorrentInfo release, string hash, s
|
|||
throw new DownloadClientException("Deluge failed to add torrent " + filename);
|
||||
}
|
||||
|
||||
// _proxy.SetTorrentSeedingConfiguration(actualHash, release.SeedConfiguration, Settings);
|
||||
_proxy.SetTorrentSeedingConfiguration(actualHash, release.SeedConfiguration, Settings);
|
||||
|
||||
var category = GetCategoryForRelease(release) ?? Settings.Category;
|
||||
|
||||
if (category.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
_proxy.SetTorrentLabel(actualHash, category, Settings);
|
||||
|
|
@ -117,12 +121,12 @@ private ValidationFailure TestConnection()
|
|||
case WebExceptionStatus.ConnectionClosed:
|
||||
return new NzbDroneValidationFailure("UseSsl", "Verify SSL settings")
|
||||
{
|
||||
DetailedDescription = "Please verify your SSL configuration on both Deluge and NzbDrone."
|
||||
DetailedDescription = "Please verify your SSL configuration on both Deluge and Prowlarr."
|
||||
};
|
||||
case WebExceptionStatus.SecureChannelFailure:
|
||||
return new NzbDroneValidationFailure("UseSsl", "Unable to connect through SSL")
|
||||
{
|
||||
DetailedDescription = "Drone is unable to connect to Deluge using SSL. This problem could be computer related. Please try to configure both drone and Deluge to not use SSL."
|
||||
DetailedDescription = "Prowlarr is unable to connect to Deluge using SSL. This problem could be computer related. Please try to configure both Prowlarr and Deluge to not use SSL."
|
||||
};
|
||||
default:
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
{
|
||||
public class DelugeException : DownloadClientException
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public DelugeTorrent[] GetTorrents(DelugeSettings settings)
|
|||
var filter = new Dictionary<string, object>();
|
||||
|
||||
// TODO: get_torrents_status returns the files as well, which starts to cause deluge timeouts when you get enough season packs.
|
||||
//var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
|
||||
// var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
|
||||
var response = ProcessRequest<DelugeUpdateUIResult>(settings, "web.update_ui", RequiredProperties, filter);
|
||||
|
||||
return GetTorrents(response);
|
||||
|
|
@ -93,7 +93,7 @@ public DelugeTorrent[] GetTorrentsByLabel(string label, DelugeSettings settings)
|
|||
var filter = new Dictionary<string, object>();
|
||||
filter.Add("label", label);
|
||||
|
||||
//var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
|
||||
// var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
|
||||
var response = ProcessRequest<DelugeUpdateUIResult>(settings, "web.update_ui", RequiredProperties, filter);
|
||||
|
||||
return GetTorrents(response);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
{
|
||||
internal class DelugeTorrentStatus
|
||||
public class DelugeTorrentStatus
|
||||
{
|
||||
public const string Paused = "Paused";
|
||||
public const string Queued = "Queued";
|
||||
|
|
|
|||
Loading…
Reference in a new issue