1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-02-21 13:37:19 +00:00

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

Fixed: Ensure an API Key is set when starting Lidarr
This commit is contained in:
Qstick 2017-07-08 08:04:27 -04:00 committed by Joseph Milazzo
parent a0847950c2
commit 48181c6666

View file

@ -142,7 +142,21 @@ public string BindAddress
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
{