Fixed: Ensure an API Key is set when starting Lidarr (#22)

Fixed: Ensure an API Key is set when starting Lidarr
pull/31/head
Qstick 7 years ago committed by Joseph Milazzo
parent a0847950c2
commit 48181c6666

@ -142,7 +142,21 @@ namespace NzbDrone.Core.Configuration
public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true);
public string ApiKey => GetValue("ApiKey", GenerateApiKey());
public string ApiKey
{
get
{
var apiKey = GetValue("ApiKey", GenerateApiKey());
if (apiKey.IsNullOrWhiteSpace())
{
apiKey = GenerateApiKey();
SetValue("ApiKey", apiKey);
}
return apiKey;
}
}
public AuthenticationType AuthenticationMethod
{

Loading…
Cancel
Save