@ -1,4 +1,4 @@
using System ;
using System ;
using System.Collections.Generic ;
using System.Linq ;
using NLog ;
@ -88,7 +88,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
var editResult = EditQueue ( "GroupSetParameter" , 0 , "drone=" + droneId , item . NzbId , settings ) ;
if ( editResult )
{
_logger . Debug ( "N zbg et download drone parameter set to: {0}", droneId ) ;
_logger . Debug ( "N ZBG et download drone parameter set to: {0}", droneId ) ;
}
return droneId ;
@ -114,7 +114,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
if ( editResult )
{
_logger . Debug ( "N zbg et download drone parameter set to: {0}", droneId ) ;
_logger . Debug ( "N ZBG et download drone parameter set to: {0}", droneId ) ;
}
return droneId ;
@ -175,7 +175,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
if ( ! EditQueue ( "GroupFinalDelete" , 0 , "" , queueItem . NzbId , settings ) )
{
_logger . Warn ( "Failed to remove item from nzbget queue , {0} [{1}]", queueItem . NzbName , queueItem . NzbId ) ;
_logger . Warn ( "Failed to remove item from NZBGet , {0} [{1}]", queueItem . NzbName , queueItem . NzbId ) ;
}
}
@ -183,13 +183,13 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
if ( ! EditQueue ( "HistoryDelete" , 0 , "" , historyItem . Id , settings ) )
{
_logger . Warn ( "Failed to remove item from nzbg et history, {0} [{1}]", historyItem . Name , historyItem . Id ) ;
_logger . Warn ( "Failed to remove item from NZBG et history, {0} [{1}]", historyItem . Name , historyItem . Id ) ;
}
}
else
{
_logger . Warn ( "Unable to remove item from nzbg et, Unknown ID: {0}", id ) ;
_logger . Warn ( "Unable to remove item from NZBG et, Unknown ID: {0}", id ) ;
return ;
}
}
@ -235,21 +235,21 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
if ( ex . Response . StatusCode = = HttpStatusCode . Unauthorized )
{
throw new DownloadClientException ( "Authentication failed for N zb Get, please check your settings", ex ) ;
throw new DownloadClientException ( "Authentication failed for N ZB Get, please check your settings", ex ) ;
}
throw new DownloadClientException ( "Unable to connect to N zb Get. " + ex . Message , ex ) ;
throw new DownloadClientException ( "Unable to connect to N ZB Get. " + ex . Message , ex ) ;
}
catch ( WebException ex )
{
throw new DownloadClientException ( "Unable to connect to N zb Get. " + ex . Message , ex ) ;
throw new DownloadClientException ( "Unable to connect to N ZB Get. " + ex . Message , ex ) ;
}
var result = Json . Deserialize < JsonRpcResponse < T > > ( response . Content ) ;
if ( result . Error ! = null )
{
throw new DownloadClientException ( "Error response received from nzbg et: {0}", result . Error . ToString ( ) ) ;
throw new DownloadClientException ( "Error response received from NZBG et: {0}", result . Error . ToString ( ) ) ;
}
return result . Result ;