From cb4d0e245018bf547d1d8295a7271c21f26366f8 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 8 May 2011 20:31:01 -0700 Subject: [PATCH] fixed blackhole config to be boolean --- NzbDrone.Core/Providers/Core/ConfigProvider.cs | 4 ++-- NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs | 2 +- NzbDrone.Web/Controllers/SettingsController.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NzbDrone.Core/Providers/Core/ConfigProvider.cs b/NzbDrone.Core/Providers/Core/ConfigProvider.cs index 4761db871..c369e87f6 100644 --- a/NzbDrone.Core/Providers/Core/ConfigProvider.cs +++ b/NzbDrone.Core/Providers/Core/ConfigProvider.cs @@ -173,9 +173,9 @@ namespace NzbDrone.Core.Providers.Core set { SetValue("SabTvPriority", value); } } - public virtual String UseBlackhole + public virtual Boolean UseBlackhole { - get { return GetValue("UseBlackhole"); } + get { return GetValueBoolean("UseBlackhole"); } set { SetValue("UseBlackhole", value); } } diff --git a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs b/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs index 12762290d..0e5d1881e 100644 --- a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs +++ b/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs @@ -157,7 +157,7 @@ namespace NzbDrone.Core.Providers.Indexer parseResult.EpisodeTitle = episodes[0].Title; var sabTitle = _sabProvider.GetSabTitle(parseResult); - if (Convert.ToBoolean(_configProvider.UseBlackhole)) + if (_configProvider.UseBlackhole) { var blackholeDir = _configProvider.BlackholeDirectory; var folder = !String.IsNullOrEmpty(blackholeDir) ? blackholeDir : Path.Combine(CentralDispatch.AppPath, "App_Data"); diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 5924ea7fd..d7a551f04 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -392,7 +392,7 @@ namespace NzbDrone.Web.Controllers _configProvider.SabTvCategory = data.SabTvCategory; _configProvider.SabUsername = data.SabUsername; _configProvider.SabTvPriority = data.SabTvPriority.ToString(); - _configProvider.UseBlackhole = data.UseBlackHole.ToString(); + _configProvider.UseBlackhole = data.UseBlackHole; _configProvider.BlackholeDirectory = data.BlackholeDirectory; return Content(SETTINGS_SAVED);