|
|
@ -24,6 +24,7 @@ namespace NzbDrone.Core.Configuration
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Dictionary<string, object> GetConfigDictionary();
|
|
|
|
Dictionary<string, object> GetConfigDictionary();
|
|
|
|
void SaveConfigDictionary(Dictionary<string, object> configValues);
|
|
|
|
void SaveConfigDictionary(Dictionary<string, object> configValues);
|
|
|
|
|
|
|
|
void EnsureDefaultConfigFile();
|
|
|
|
|
|
|
|
|
|
|
|
string BindAddress { get; }
|
|
|
|
string BindAddress { get; }
|
|
|
|
int Port { get; }
|
|
|
|
int Port { get; }
|
|
|
@ -255,7 +256,7 @@ namespace NzbDrone.Core.Configuration
|
|
|
|
|
|
|
|
|
|
|
|
public T GetValueEnum<T>(string key, T defaultValue, bool persist = true)
|
|
|
|
public T GetValueEnum<T>(string key, T defaultValue, bool persist = true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return (T)Enum.Parse(typeof(T), GetValue(key, defaultValue), persist);
|
|
|
|
return (T)Enum.Parse(typeof(T), GetValue(key, defaultValue, persist));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string GetValue(string key, object defaultValue, bool persist = true)
|
|
|
|
public string GetValue(string key, object defaultValue, bool persist = true)
|
|
|
@ -314,7 +315,7 @@ namespace NzbDrone.Core.Configuration
|
|
|
|
SetValue(key, value.ToString().ToLower());
|
|
|
|
SetValue(key, value.ToString().ToLower());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void EnsureDefaultConfigFile()
|
|
|
|
public void EnsureDefaultConfigFile()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!File.Exists(_configFile))
|
|
|
|
if (!File.Exists(_configFile))
|
|
|
|
{
|
|
|
|
{
|
|
|
|