1
0
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:
Taloth Saldono 2015-03-21 21:28:23 +01:00
parent db4746bef7
commit 93c6047cd5
2 changed files with 7 additions and 2 deletions

View File

@ -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)
{ {

View File

@ -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)