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 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
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)
{

View File

@ -86,7 +86,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
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)