mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Finished #459
This commit is contained in:
parent
d843ab0ebb
commit
632ce75fa0
7 changed files with 84 additions and 22 deletions
|
@ -55,6 +55,7 @@ namespace PlexRequests.Core.SettingModels
|
|||
public string NoApprovalUsers { get; set; }
|
||||
public bool CollectAnalyticData { get; set; }
|
||||
public bool IgnoreNotifyForAutoApprovedRequests { get; set; }
|
||||
public bool Wizard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The CSS name of the theme we want
|
||||
|
|
|
@ -184,15 +184,25 @@ namespace PlexRequests.Core
|
|||
var plexSettings = new SettingsServiceV2<PlexSettings>(new SettingsJsonRepository(Db, new MemoryCacheProvider()));
|
||||
|
||||
var currentSettings = plexSettings.GetSettings();
|
||||
if (!string.IsNullOrEmpty(auth.OldPlexAuthToken))
|
||||
if (!string.IsNullOrEmpty(auth?.OldPlexAuthToken))
|
||||
{
|
||||
currentSettings.PlexAuthToken = auth.OldPlexAuthToken;
|
||||
currentSettings.PlexAuthToken = auth?.OldPlexAuthToken;
|
||||
plexSettings.SaveSettings(currentSettings);
|
||||
|
||||
// Clear out the old value
|
||||
auth.OldPlexAuthToken = string.Empty;
|
||||
authSettings.SaveSettings(auth);
|
||||
}
|
||||
|
||||
|
||||
//If we have an authToken we do not need to go through the setup
|
||||
if (!string.IsNullOrEmpty(auth?.OldPlexAuthToken))
|
||||
{
|
||||
var prServuce = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(Db, new MemoryCacheProvider()));
|
||||
var settings = prServuce.GetSettings();
|
||||
settings.Wizard = true;
|
||||
prServuce.SaveSettings(settings);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue