mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 10:17:47 +00:00
parent
08ba273089
commit
e52fcf843c
1 changed files with 18 additions and 2 deletions
|
@ -47,11 +47,27 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetVersion(DelugeSettings settings)
|
public string GetVersion(DelugeSettings settings)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var response = ProcessRequest<string>(settings, "daemon.info");
|
var response = ProcessRequest<string>(settings, "daemon.info");
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
catch (DownloadClientException ex)
|
||||||
|
{
|
||||||
|
if (ex.Message.Contains("Unknown method"))
|
||||||
|
{
|
||||||
|
// Deluge v2 beta replaced 'daemon.info' with 'daemon.get_version'.
|
||||||
|
// It may return or become official, for now we just retry with the get_version api.
|
||||||
|
var response = ProcessRequest<string>(settings, "daemon.get_version");
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Dictionary<string, object> GetConfig(DelugeSettings settings)
|
public Dictionary<string, object> GetConfig(DelugeSettings settings)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue