mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Added Nzbget version check for 12.0 or higher.
This commit is contained in:
parent
db4746bef7
commit
93c6047cd5
@ -254,7 +254,12 @@ private ValidationFailure TestConnection()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_proxy.GetVersion(Settings);
|
var version = _proxy.GetVersion(Settings);
|
||||||
|
|
||||||
|
if (Version.Parse(version) < Version.Parse("12.0"))
|
||||||
|
{
|
||||||
|
return new ValidationFailure(string.Empty, "Nzbget version too low, need 12.0 or higher");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ public String GetVersion(NzbgetSettings settings)
|
|||||||
{
|
{
|
||||||
var request = BuildRequest(new JsonRequest("version"));
|
var request = BuildRequest(new JsonRequest("version"));
|
||||||
|
|
||||||
return Json.Deserialize<NzbgetResponse<String>>(ProcessRequest(request, settings)).Version;
|
return Json.Deserialize<NzbgetResponse<String>>(ProcessRequest(request, settings)).Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<String, String> GetConfig(NzbgetSettings settings)
|
public Dictionary<String, String> GetConfig(NzbgetSettings settings)
|
||||||
|
Loading…
Reference in New Issue
Block a user