@ -1,4 +1,4 @@
using System ;
using System ;
using System.Collections.Generic ;
using System.Linq ;
using System.Text.RegularExpressions ;
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
protected override string AddFromNzbFile ( RemoteMovie remoteMovie , string filename , byte [ ] fileContents )
{
var category = Settings . Tv Category;
var category = Settings . Movie Category;
var priority = Settings . RecentTvPriority ;
var response = _proxy . DownloadNzb ( fileContents , filename , category , priority , Settings ) ;
@ -119,7 +119,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
try
{
sabHistory = _proxy . GetHistory ( 0 , _configService . DownloadClientHistoryLimit , Settings . Tv Category, Settings ) ;
sabHistory = _proxy . GetHistory ( 0 , _configService . DownloadClientHistoryLimit , Settings . Movie Category, Settings ) ;
}
catch ( DownloadClientException ex )
{
@ -200,7 +200,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
{
foreach ( var downloadClientItem in GetQueue ( ) . Concat ( GetHistory ( ) ) )
{
if ( downloadClientItem . Category = = Settings . Tv Category | | downloadClientItem . Category = = "*" & & Settings . Tv Category. IsNullOrWhiteSpace ( ) )
if ( downloadClientItem . Category = = Settings . Movie Category | | downloadClientItem . Category = = "*" & & Settings . Movie Category. IsNullOrWhiteSpace ( ) )
{
yield return downloadClientItem ;
}
@ -254,7 +254,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
var config = _proxy . GetConfig ( Settings ) ;
var categories = GetCategories ( config ) . ToArray ( ) ;
var category = categories . FirstOrDefault ( v = > v . Name = = Settings . Tv Category) ;
var category = categories . FirstOrDefault ( v = > v . Name = = Settings . Movie Category) ;
if ( category = = null )
{
@ -366,7 +366,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
if ( rawVersion . Equals ( "develop" , StringComparison . InvariantCultureIgnoreCase ) )
{
return new NzbDroneValidationFailure ( "Version" , "S ab nzbd develop version, assuming version 1.1.0 or higher.")
return new NzbDroneValidationFailure ( "Version" , "S AB nzbd develop version, assuming version 1.1.0 or higher.")
{
IsWarning = true ,
DetailedDescription = "Radarr may not be able to support new features added to SABnzbd when running develop versions."
@ -419,10 +419,10 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
var config = _proxy . GetConfig ( Settings ) ;
if ( config . Misc . pre_check & & ! HasVersion ( 1 , 1 ) )
{
return new NzbDroneValidationFailure ( "" , "Disable 'Check before download' option in S abnbz d")
return new NzbDroneValidationFailure ( "" , "Disable 'Check before download' option in S ABnzb d")
{
InfoLink = string . Format ( "http://{0}:{1}/sabnzbd/config/switches/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "Using Check before download affects Radarr ability to track new downloads. Also S ab nzbd recommends 'Abort jobs that cannot be completed' instead since it's more effective."
DetailedDescription = "Using Check before download affects Radarr ability to track new downloads. Also S AB nzbd recommends 'Abort jobs that cannot be completed' instead since it's more effective."
} ;
}
@ -432,52 +432,52 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
private ValidationFailure TestCategory ( )
{
var config = _proxy . GetConfig ( Settings ) ;
var category = GetCategories ( config ) . FirstOrDefault ( ( SabnzbdCategory v ) = > v . Name = = Settings . Tv Category) ;
var category = GetCategories ( config ) . FirstOrDefault ( ( SabnzbdCategory v ) = > v . Name = = Settings . Movie Category) ;
if ( category ! = null )
{
if ( category . Dir . EndsWith ( "*" ) )
{
return new NzbDroneValidationFailure ( " Tv Category", "Enable Job folders" )
return new NzbDroneValidationFailure ( " Movie Category", "Enable Job folders" )
{
InfoLink = string . Format ( "http://{0}:{1}/sabnzbd/config/categories/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "Radarr prefers each download to have a separate folder. With * appended to the Folder/Path S abnzbd will not create these job folders. Go to Sab nzbd to fix it."
DetailedDescription = "Radarr prefers each download to have a separate folder. With * appended to the Folder/Path S ABnzbd will not create these job folders. Go to SAB nzbd to fix it."
} ;
}
}
else
{
if ( ! Settings . Tv Category. IsNullOrWhiteSpace ( ) )
if ( ! Settings . Movie Category. IsNullOrWhiteSpace ( ) )
{
return new NzbDroneValidationFailure ( " Tv Category", "Category does not exist" )
return new NzbDroneValidationFailure ( " Movie Category", "Category does not exist" )
{
InfoLink = string . Format ( "http://{0}:{1}/sabnzbd/config/categories/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "The Category your entered doesn't exist in Sabnzbd. Go to Sab nzbd to create it."
DetailedDescription = "The category you entered doesn't exist in SABnzbd. Go to SAB nzbd to create it."
} ;
}
}
if ( config . Misc . enable_tv_sorting & & ContainsCategory ( config . Misc . tv_categories , Settings . Tv Category) )
if ( config . Misc . enable_tv_sorting & & ContainsCategory ( config . Misc . tv_categories , Settings . Movie Category) )
{
return new NzbDroneValidationFailure ( " Tv Category", "Disable TV Sorting" )
return new NzbDroneValidationFailure ( " Movie Category", "Disable TV Sorting" )
{
InfoLink = string . Format ( "http://{0}:{1}/sabnzbd/config/sorting/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "You must disable S abnzbd TV Sorting for the category Radarr uses to prevent import issues. Go to Sab nzbd to fix it."
DetailedDescription = "You must disable S ABnzbd TV Sorting for the category Radarr uses to prevent import issues. Go to SAB nzbd to fix it."
} ;
}
if ( config . Misc . enable_movie_sorting & & ContainsCategory ( config . Misc . movie_categories , Settings . Tv Category) )
if ( config . Misc . enable_movie_sorting & & ContainsCategory ( config . Misc . movie_categories , Settings . Movie Category) )
{
return new NzbDroneValidationFailure ( " Tv Category", "Disable Movie Sorting" )
return new NzbDroneValidationFailure ( " Movie Category", "Disable Movie Sorting" )
{
InfoLink = string . Format ( "http://{0}:{1}/sabnzbd/config/sorting/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "You must disable S abnzbd Movie Sorting for the category Radarr uses to prevent import issues. Go to Sab nzbd to fix it."
DetailedDescription = "You must disable S ABnzbd Movie Sorting for the category Radarr uses to prevent import issues. Go to SAB nzbd to fix it."
} ;
}
if ( config . Misc . enable_date_sorting & & ContainsCategory ( config . Misc . date_categories , Settings . Tv Category) )
if ( config . Misc . enable_date_sorting & & ContainsCategory ( config . Misc . date_categories , Settings . Movie Category) )
{
return new NzbDroneValidationFailure ( " Tv Category", "Disable Date Sorting" )
return new NzbDroneValidationFailure ( " Movie Category", "Disable Date Sorting" )
{
InfoLink = string . Format ( "http://{0}:{1}/sabnzbd/config/sorting/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "You must disable S abnzbd Date Sorting for the category Radarr uses to prevent import issues. Go to Sab nzbd to fix it."
DetailedDescription = "You must disable S ABnzbd Date Sorting for the category Radarr uses to prevent import issues. Go to SAB nzbd to fix it."
} ;
}