From d703bc8dc5e044c276c218a6ee1aff5eee34ae3e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 19 Feb 2014 18:40:19 -0800 Subject: [PATCH] Fixed: SABnzbd test with fail if the API Key is wrong --- src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs | 2 +- src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index 79777d009..69601663f 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -127,7 +127,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd var settings = new SabnzbdSettings(); settings.InjectFrom(message); - _sabnzbdProxy.GetVersion(settings); + _sabnzbdProxy.GetCategories(settings); } } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs index be2c499d4..6d43e443e 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs @@ -85,12 +85,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd var request = new RestRequest(); var action = "mode=get_cats"; - SabnzbdCategoryResponse response; - - if (!Json.TryDeserialize(ProcessRequest(request, action, settings), out response)) - { - response = new SabnzbdCategoryResponse(); - } + var response = Json.Deserialize(ProcessRequest(request, action, settings)); return response; }