Because it's 2016!

This commit is contained in:
Keivan Beigi 2016-12-08 22:54:15 -08:00
parent 2e36538dcd
commit aba613acd1
220 changed files with 450 additions and 2053 deletions

View file

@ -133,33 +133,15 @@ namespace NzbDrone.Core.Configuration
}
}
public int Port
{
get { return GetValueInt("Port", 8989); }
}
public int Port => GetValueInt("Port", 8989);
public int SslPort
{
get { return GetValueInt("SslPort", 9898); }
}
public int SslPort => GetValueInt("SslPort", 9898);
public bool EnableSsl
{
get { return GetValueBoolean("EnableSsl", false); }
}
public bool EnableSsl => GetValueBoolean("EnableSsl", false);
public bool LaunchBrowser
{
get { return GetValueBoolean("LaunchBrowser", true); }
}
public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true);
public string ApiKey
{
get
{
return GetValue("ApiKey", GenerateApiKey());
}
}
public string ApiKey => GetValue("ApiKey", GenerateApiKey());
public AuthenticationType AuthenticationMethod
{
@ -177,28 +159,13 @@ namespace NzbDrone.Core.Configuration
}
}
public bool AnalyticsEnabled
{
get
{
return GetValueBoolean("AnalyticsEnabled", true, persist: false);
}
}
public bool AnalyticsEnabled => GetValueBoolean("AnalyticsEnabled", true, persist: false);
public string Branch
{
get { return GetValue("Branch", "master").ToLowerInvariant(); }
}
public string Branch => GetValue("Branch", "master").ToLowerInvariant();
public string LogLevel
{
get { return GetValue("LogLevel", "Info"); }
}
public string LogLevel => GetValue("LogLevel", "Info");
public string SslCertHash
{
get { return GetValue("SslCertHash", ""); }
}
public string SslCertHash => GetValue("SslCertHash", "");
public string UrlBase
{
@ -215,28 +182,13 @@ namespace NzbDrone.Core.Configuration
}
}
public string UiFolder
{
get
{
return GetValue("UiFolder", "UI", false);
}
}
public string UiFolder => GetValue("UiFolder", "UI", false);
public bool UpdateAutomatically
{
get { return GetValueBoolean("UpdateAutomatically", false, false); }
}
public bool UpdateAutomatically => GetValueBoolean("UpdateAutomatically", false, false);
public UpdateMechanism UpdateMechanism
{
get { return GetValueEnum("UpdateMechanism", UpdateMechanism.BuiltIn, false); }
}
public UpdateMechanism UpdateMechanism => GetValueEnum("UpdateMechanism", UpdateMechanism.BuiltIn, false);
public string UpdateScriptPath
{
get { return GetValue("UpdateScriptPath", "", false ); }
}
public string UpdateScriptPath => GetValue("UpdateScriptPath", "", false );
public int GetValueInt(string key, int defaultValue)
{