diff --git a/NzbDrone.Backbone/Content/form.css b/NzbDrone.Backbone/Content/form.css index 30d0d8f02..5b71b9175 100644 --- a/NzbDrone.Backbone/Content/form.css +++ b/NzbDrone.Backbone/Content/form.css @@ -1,9 +1,17 @@ -.form-horizontal .controls i { - font-size: 16px; - /*color: #3A87AD;*/ /* Info blue */ - color: #595959; - cursor: default; -} + .form-horizontal .controls i { + font-size: 16px; + /*color: #3A87AD;*/ /* Info blue */ + color: #595959; + cursor: default; + } + + .form-horizontal .controls i.warning { + color: #F89406; + } + + .form-horizontal .controls i.danger { + color: #B94A48; + } .help-inline-checkbox { float: left; @@ -13,4 +21,14 @@ .switch { float: left; +} + +textarea.nzb-restrictions { + width: 260px; +} + +.text-area-help { + display: block; + color: #777777; + font-size: 12px; } \ No newline at end of file diff --git a/NzbDrone.Backbone/Settings/Misc/MiscTemplate.html b/NzbDrone.Backbone/Settings/Misc/MiscTemplate.html index d2bf14dfe..67cb64882 100644 --- a/NzbDrone.Backbone/Settings/Misc/MiscTemplate.html +++ b/NzbDrone.Backbone/Settings/Misc/MiscTemplate.html @@ -1,3 +1,40 @@ -
- Misc settings will go here -
\ No newline at end of file +
+ General + +
+ +
+
+ +
+ + + + +
+
+ +
+ +
+
+ +
+ + + +
+
+ +
+ +
+ + + + + Newline-delimited set of rules in the form of +|-: +
+
+
\ No newline at end of file diff --git a/NzbDrone.Backbone/Settings/Misc/MiscView.js b/NzbDrone.Backbone/Settings/Misc/MiscView.js index 60916bd41..306c42769 100644 --- a/NzbDrone.Backbone/Settings/Misc/MiscView.js +++ b/NzbDrone.Backbone/Settings/Misc/MiscView.js @@ -7,9 +7,17 @@ define([ NzbDrone.Settings.Misc.MiscView = Backbone.Marionette.ItemView.extend({ template: 'Settings/Misc/MiscTemplate', + className: 'form-horizontal', + + ui: { + switch: '.switch', + tooltip: '[class^="help-inline"] i' + }, onRender: function () { NzbDrone.ModelBinder.bind(this.model, this.el); + this.ui.switch.bootstrapSwitch(); + this.ui.tooltip.tooltip({ placement: 'right', html: true }); } }); }); diff --git a/NzbDrone.Core/Configuration/ConfigService.cs b/NzbDrone.Core/Configuration/ConfigService.cs index e8470b657..276689a16 100644 --- a/NzbDrone.Core/Configuration/ConfigService.cs +++ b/NzbDrone.Core/Configuration/ConfigService.cs @@ -149,7 +149,6 @@ namespace NzbDrone.Core.Configuration set { SetValue("DownloadClientTvDirectory", value); } } - public bool UseSeasonFolder { get { return GetValueBoolean("UseSeasonFolder", true); } @@ -373,12 +372,6 @@ namespace NzbDrone.Core.Configuration set { SetValue("MetadataUseBanners", value); } } - public string AllowedReleaseGroups - { - get { return GetValue("AllowedReleaseGroups"); } - set { SetValue("AllowedReleaseGroups", value); } - } - public string PneumaticDirectory { get { return GetValue("PneumaticDirectory", String.Empty); } @@ -479,6 +472,12 @@ namespace NzbDrone.Core.Configuration set { SetValue("NzbgetRecentTvPriority", (int)value); } } + public string NzbRestrictions + { + get { return GetValue("NzbRestrictions", String.Empty); } + set { SetValue("NzbRestrictions", value); } + } + private string GetValue(string key) { return GetValue(key, String.Empty); diff --git a/NzbDrone.Core/Configuration/IConfigService.cs b/NzbDrone.Core/Configuration/IConfigService.cs index fb644569c..6e7e18b74 100644 --- a/NzbDrone.Core/Configuration/IConfigService.cs +++ b/NzbDrone.Core/Configuration/IConfigService.cs @@ -61,7 +61,6 @@ namespace NzbDrone.Core.Configuration string PlexUsername { get; set; } string PlexPassword { get; set; } Boolean MetadataUseBanners { get; set; } - string AllowedReleaseGroups { get; set; } string PneumaticDirectory { get; set; } string RecycleBin { get; set; } int RssSyncInterval { get; set; } @@ -77,6 +76,7 @@ namespace NzbDrone.Core.Configuration Int32 NzbgetPriority { get; set; } PriorityType NzbgetBacklogTvPriority { get; set; } PriorityType NzbgetRecentTvPriority { get; set; } + string NzbRestrictions { get; set; } string GetValue(string key, object defaultValue, bool persist = false); void SetValue(string key, string value); void SaveValues(Dictionary configValues); diff --git a/NzbDrone.Core/DecisionEngine/Specifications/AllowedReleaseGroupSpecification.cs b/NzbDrone.Core/DecisionEngine/Specifications/AllowedReleaseGroupSpecification.cs index 2baf97d2f..644d6ee6f 100644 --- a/NzbDrone.Core/DecisionEngine/Specifications/AllowedReleaseGroupSpecification.cs +++ b/NzbDrone.Core/DecisionEngine/Specifications/AllowedReleaseGroupSpecification.cs @@ -29,7 +29,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications { _logger.Trace("Beginning release group check for: {0}", subject); - var allowed = _configService.AllowedReleaseGroups; + //Todo: Make this use NzbRestrictions - How should whitelist be used? Will it override blacklist or vice-versa? + + //var allowed = _configService.AllowedReleaseGroups; + var allowed = ""; if (string.IsNullOrWhiteSpace(allowed)) return true;