Fixed: Category is not required SABnzbd or NZBGet
This commit is contained in:
parent
3735736bbc
commit
6a9993fa70
|
@ -42,9 +42,8 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
{
|
{
|
||||||
var url = remoteEpisode.Release.DownloadUrl;
|
var url = remoteEpisode.Release.DownloadUrl;
|
||||||
var title = remoteEpisode.Release.Title + ".nzb";
|
var title = remoteEpisode.Release.Title + ".nzb";
|
||||||
|
var category = Settings.TvCategory;
|
||||||
string category = Settings.TvCategory;
|
var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
|
||||||
int priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
|
|
||||||
|
|
||||||
_logger.Info("Adding report [{0}] to the queue.", title);
|
_logger.Info("Adding report [{0}] to the queue.", title);
|
||||||
|
|
||||||
|
@ -271,10 +270,9 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
_proxy.GetVersion(settings);
|
_proxy.GetVersion(settings);
|
||||||
|
|
||||||
var config = _proxy.GetConfig(settings);
|
var config = _proxy.GetConfig(settings);
|
||||||
|
|
||||||
var categories = GetCategories(config);
|
var categories = GetCategories(config);
|
||||||
|
|
||||||
if (!categories.Any(v => v.Name == settings.TvCategory))
|
if (!settings.TvCategory.IsNullOrWhiteSpace() && !categories.Any(v => v.Name == settings.TvCategory))
|
||||||
{
|
{
|
||||||
throw new ApplicationException("Category does not exist");
|
throw new ApplicationException("Category does not exist");
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
{
|
{
|
||||||
var categories = _proxy.GetCategories(settings);
|
var categories = _proxy.GetCategories(settings);
|
||||||
|
|
||||||
if (!categories.Any(v => v == settings.TvCategory))
|
if (!settings.TvCategory.IsNullOrWhiteSpace() && !categories.Any(v => v == settings.TvCategory))
|
||||||
{
|
{
|
||||||
throw new ApplicationException("Category does not exist");
|
throw new ApplicationException("Category does not exist");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue