mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 20:44:00 +02:00
Added Auth, startup options to UI
Added caching to ConfigFileProvider,
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user