mirror of
https://github.com/Radarr/Radarr
synced 2025-01-01 04:45:35 +00:00
Fixed: Ensure an API Key is set when starting Radarr (#1652)
This commit is contained in:
parent
43446ee3d0
commit
7af88037bb
1 changed files with 16 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -141,7 +141,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