Prevent adding a root folder that is the same as drone factory

This commit is contained in:
Mark McDowall 2013-08-02 00:16:37 -07:00
commit 485f05d4b9
6 changed files with 33 additions and 11 deletions

View file

@ -8,6 +8,11 @@ using NzbDrone.Core.Download.Clients.Sabnzbd;
namespace NzbDrone.Core.Configuration
{
public enum ConfigKey
{
DownloadedEpisodesFolder
}
public class ConfigService : IConfigService
{
private readonly IConfigRepository _repository;
@ -118,9 +123,9 @@ namespace NzbDrone.Core.Configuration
public String DownloadedEpisodesFolder
{
get { return GetValue("DownloadedEpisodesFolder"); }
get { return GetValue(ConfigKey.DownloadedEpisodesFolder.ToString()); }
set { SetValue("DownloadedEpisodesFolder", value); }
set { SetValue(ConfigKey.DownloadedEpisodesFolder.ToString(), value); }
}
public bool UseSeasonFolder
@ -136,7 +141,6 @@ namespace NzbDrone.Core.Configuration
set { SetValue("SeasonFolderFormat", value); }
}
public bool AutoUnmonitorPreviouslyDownloadedEpisodes
{
get { return GetValueBoolean("AutoUnmonitorPreviouslyDownloadedEpisodes"); }