mirror of
https://github.com/Radarr/Radarr
synced 2025-12-24 01:10:41 +01:00
Update to work with Deluge v2 (#3577)
This commit is contained in:
parent
61066cb6cf
commit
e6d3954e79
1 changed files with 18 additions and 2 deletions
|
|
@ -48,9 +48,25 @@ public DelugeProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger lo
|
|||
|
||||
public string GetVersion(DelugeSettings settings)
|
||||
{
|
||||
var response = ProcessRequest<string>(settings, "daemon.info");
|
||||
try
|
||||
{
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue