mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added Auth, startup options to UI
Added caching to ConfigFileProvider,
This commit is contained in:
parent
8a5bd31da7
commit
4da6654440
34 changed files with 579 additions and 365 deletions
|
@ -43,6 +43,23 @@ namespace NzbDrone.Core.Configuration
|
|||
return dict;
|
||||
}
|
||||
|
||||
public void SaveValues(Dictionary<string, object> configValues)
|
||||
{
|
||||
var allWithDefaults = AllWithDefaults();
|
||||
|
||||
foreach (var configValue in configValues)
|
||||
{
|
||||
object currentValue;
|
||||
allWithDefaults.TryGetValue(configValue.Key, out currentValue);
|
||||
if (currentValue == null) continue;
|
||||
|
||||
var equal = configValue.Value.ToString().Equals(currentValue.ToString());
|
||||
|
||||
if (!equal)
|
||||
SetValue(configValue.Key, configValue.Value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public String SabHost
|
||||
{
|
||||
get { return GetValue("SabHost", "localhost"); }
|
||||
|
@ -132,18 +149,6 @@ namespace NzbDrone.Core.Configuration
|
|||
set { SetValue("UpdateUrl", value); }
|
||||
}
|
||||
|
||||
public string TwitterAccessToken
|
||||
{
|
||||
get { return GetValue("TwitterAccessToken", String.Empty); }
|
||||
set { SetValue("TwitterAccessToken", value); }
|
||||
}
|
||||
|
||||
public string TwitterAccessTokenSecret
|
||||
{
|
||||
get { return GetValue("TwitterAccessTokenSecret", String.Empty); }
|
||||
set { SetValue("TwitterAccessTokenSecret", value); }
|
||||
}
|
||||
|
||||
public bool EnableBacklogSearching
|
||||
{
|
||||
get { return GetValueBoolean("EnableBacklogSearching"); }
|
||||
|
@ -365,22 +370,7 @@ namespace NzbDrone.Core.Configuration
|
|||
SetValue(key, value.ToString().ToLower());
|
||||
}
|
||||
|
||||
public void SaveValues(Dictionary<string, object> configValues)
|
||||
{
|
||||
var allWithDefaults = AllWithDefaults();
|
||||
|
||||
foreach (var configValue in configValues)
|
||||
{
|
||||
object currentValue;
|
||||
allWithDefaults.TryGetValue(configValue.Key, out currentValue);
|
||||
if (currentValue == null) continue;
|
||||
|
||||
var equal = configValue.Value.ToString().Equals(currentValue.ToString());
|
||||
|
||||
if (!equal)
|
||||
SetValue(configValue.Key, configValue.Value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsureCache()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue