mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
Moved the plex auth token to the plex settings where it should belong.
This commit is contained in:
parent
ffe6bc41ac
commit
57ec940d5a
18 changed files with 2753 additions and 2837 deletions
|
@ -61,6 +61,10 @@ namespace PlexRequests.Core
|
|||
{
|
||||
MigrateToVersion1800();
|
||||
}
|
||||
if (version > 1899 && version <= 1900)
|
||||
{
|
||||
MigrateToVersion1900();
|
||||
}
|
||||
}
|
||||
|
||||
return Db.DbConnection().ConnectionString;
|
||||
|
@ -167,11 +171,23 @@ namespace PlexRequests.Core
|
|||
Log.Error(ex, "Failed to cache CouchPotato quality profiles!");
|
||||
}
|
||||
}
|
||||
public void MigrateToVersion1700()
|
||||
public void MigrateToVersion1900()
|
||||
{
|
||||
// Drop old tables
|
||||
TableCreation.DropTable(Db.DbConnection(), "User");
|
||||
TableCreation.DropTable(Db.DbConnection(), "Log");
|
||||
// Need to change the Plex Token location
|
||||
var authSettings = new SettingsServiceV2<AuthenticationSettings>(new SettingsJsonRepository(Db, new MemoryCacheProvider()));
|
||||
var auth = authSettings.GetSettings();
|
||||
var plexSettings = new SettingsServiceV2<PlexSettings>(new SettingsJsonRepository(Db, new MemoryCacheProvider()));
|
||||
|
||||
var currentSettings = plexSettings.GetSettings();
|
||||
if (!string.IsNullOrEmpty(auth.OldPlexAuthToken))
|
||||
{
|
||||
currentSettings.PlexAuthToken = auth.OldPlexAuthToken;
|
||||
plexSettings.SaveSettings(currentSettings);
|
||||
|
||||
// Clear out the old value
|
||||
auth.OldPlexAuthToken = string.Empty;
|
||||
authSettings.SaveSettings(auth);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue