mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07: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 @@ namespace NzbDrone.Core.Configuration
|
||||||
|
|
||||||
public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true);
|
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
|
public AuthenticationType AuthenticationMethod
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue