diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-11-27 08:49:52 -0700 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2022-11-27 08:49:52 -0700 |
| commit | 4e34c428d8ed8753af0fa81a8833ac92a7d2f5ac (patch) | |
| tree | 29fbe5f7355bc7dfe96a7787df34dec8fe75597d /Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs | |
| parent | 5787ab15dc297da6d2e1ec984ccf19751ed85db6 (diff) | |
| parent | d4bd72049b4609582fb57f63134bee58327bc0cc (diff) | |
Merge branch 'master' into fix-fmp4-flac-opus
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs')
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs index 74f2349f5..37716482c 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs @@ -10,6 +10,7 @@ using Jellyfin.Server.Implementations; using MediaBrowser.Controller; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Dto; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using SQLitePCL.pretty; @@ -24,7 +25,7 @@ namespace Jellyfin.Server.Migrations.Routines private readonly ILogger<MigrateDisplayPreferencesDb> _logger; private readonly IServerApplicationPaths _paths; - private readonly JellyfinDbProvider _provider; + private readonly IDbContextFactory<JellyfinDb> _provider; private readonly JsonSerializerOptions _jsonOptions; private readonly IUserManager _userManager; @@ -38,7 +39,7 @@ namespace Jellyfin.Server.Migrations.Routines public MigrateDisplayPreferencesDb( ILogger<MigrateDisplayPreferencesDb> logger, IServerApplicationPaths paths, - JellyfinDbProvider provider, + IDbContextFactory<JellyfinDb> provider, IUserManager userManager) { _logger = logger; @@ -84,7 +85,7 @@ namespace Jellyfin.Server.Migrations.Routines var dbFilePath = Path.Combine(_paths.DataPath, DbFilename); using (var connection = SQLite3.Open(dbFilePath, ConnectionFlags.ReadOnly, null)) { - using var dbContext = _provider.CreateContext(); + using var dbContext = _provider.CreateDbContext(); var results = connection.Query("SELECT * FROM userdisplaypreferences"); foreach (var result in results) |
