@ -1,4 +1,4 @@
using System ;
using System ;
using System.IO ;
using System.IO ;
using System.Linq ;
using System.Linq ;
using System.Collections.Generic ;
using System.Collections.Generic ;
@ -38,7 +38,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
protected override string AddFromNzbFile ( RemoteMovie remoteMovie , string filename , byte [ ] fileContents )
protected override string AddFromNzbFile ( RemoteMovie remoteMovie , string filename , byte [ ] fileContents )
{
{
var category = Settings . TvCategory; // TODO: Update this to MovieCategory?
var category = Settings . MovieCategory;
var priority = Settings . RecentTvPriority ;
var priority = Settings . RecentTvPriority ;
@ -204,7 +204,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
public override IEnumerable < DownloadClientItem > GetItems ( )
public override IEnumerable < DownloadClientItem > GetItems ( )
{
{
return GetQueue ( ) . Concat ( GetHistory ( ) ) . Where ( downloadClientItem = > downloadClientItem . Category = = Settings . Tv Category) ;
return GetQueue ( ) . Concat ( GetHistory ( ) ) . Where ( downloadClientItem = > downloadClientItem . Category = = Settings . Movie Category) ;
}
}
public override void RemoveItem ( string downloadId , bool deleteData )
public override void RemoveItem ( string downloadId , bool deleteData )
@ -221,7 +221,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
{
var config = _proxy . GetConfig ( Settings ) ;
var config = _proxy . GetConfig ( Settings ) ;
var category = GetCategories ( config ) . FirstOrDefault ( v = > v . Name = = Settings . Tv Category) ;
var category = GetCategories ( config ) . FirstOrDefault ( v = > v . Name = = Settings . Movie Category) ;
var status = new DownloadClientStatus
var status = new DownloadClientStatus
{
{
@ -283,7 +283,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
if ( Version . Parse ( version ) < Version . Parse ( "12.0" ) )
if ( Version . Parse ( version ) < Version . Parse ( "12.0" ) )
{
{
return new ValidationFailure ( string . Empty , "N zbg et version too low, need 12.0 or higher") ;
return new ValidationFailure ( string . Empty , "N ZBG et version too low, need 12.0 or higher") ;
}
}
}
}
catch ( Exception ex )
catch ( Exception ex )
@ -304,12 +304,12 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
var config = _proxy . GetConfig ( Settings ) ;
var config = _proxy . GetConfig ( Settings ) ;
var categories = GetCategories ( config ) ;
var categories = GetCategories ( config ) ;
if ( ! Settings . Tv Category. IsNullOrWhiteSpace ( ) & & ! categories . Any ( v = > v . Name = = Settings . Tv Category) )
if ( ! Settings . Movie Category. IsNullOrWhiteSpace ( ) & & ! categories . Any ( v = > v . Name = = Settings . Movie Category) )
{
{
return new NzbDroneValidationFailure ( " Tv Category", "Category does not exist" )
return new NzbDroneValidationFailure ( " Movie Category", "Category does not exist" )
{
{
InfoLink = string . Format ( "http://{0}:{1}/" , Settings . Host , Settings . Port ) ,
InfoLink = string . Format ( "http://{0}:{1}/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "The Category your entered doesn't exist in NzbGet. Go to Nzb Get to create it."
DetailedDescription = "The category you entered doesn't exist in NZBGet. Go to NZB Get to create it."
} ;
} ;
}
}
@ -323,10 +323,10 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
var keepHistory = config . GetValueOrDefault ( "KeepHistory" ) ;
var keepHistory = config . GetValueOrDefault ( "KeepHistory" ) ;
if ( keepHistory = = "0" )
if ( keepHistory = = "0" )
{
{
return new NzbDroneValidationFailure ( string . Empty , "N zb Get setting KeepHistory should be greater than 0")
return new NzbDroneValidationFailure ( string . Empty , "N ZB Get setting KeepHistory should be greater than 0")
{
{
InfoLink = string . Format ( "http://{0}:{1}/" , Settings . Host , Settings . Port ) ,
InfoLink = string . Format ( "http://{0}:{1}/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "N zb Get setting KeepHistory is set to 0. Which prevents Radarr from seeing completed downloads."
DetailedDescription = "N ZB Get setting KeepHistory is set to 0. Which prevents Radarr from seeing completed downloads."
} ;
} ;
}
}