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:
parent
a0847950c2
commit
48181c6666
1 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue