The Free Software Media System - Server Backend & API
Rename JellyfinDb to JellyfinDbContext
Patrick Barron8479f0f90cd8
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 7b3d07dfc1..0b8a314192 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -654,7 +654,7 @@ namespace Emby.Server.Implementations/// <returns>A task representing the service initialization operation.</returns>public async Task InitializeServices(){- var jellyfinDb = await Resolve<IDbContextFactory<JellyfinDb>>().CreateDbContextAsync().ConfigureAwait(false);+ var jellyfinDb = await Resolve<IDbContextFactory<JellyfinDbContext>>().CreateDbContextAsync().ConfigureAwait(false);await using (jellyfinDb.ConfigureAwait(false)){if ((await jellyfinDb.Database.GetPendingMigrationsAsync().ConfigureAwait(false)).Any())diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.csindex 1efacd8562..1f3cb9b63f 100644--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs@@ -17,7 +17,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks{private readonly ILogger<OptimizeDatabaseTask> _logger;private readonly ILocalizationManager _localization;- private readonly IDbContextFactory<JellyfinDb> _provider;+ private readonly IDbContextFactory<JellyfinDbContext> _provider;/// <summary>/// Initializes a new instance of the <see cref="OptimizeDatabaseTask" /> class.@@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Taskspublic OptimizeDatabaseTask(ILogger<OptimizeDatabaseTask> logger,ILocalizationManager localization,- IDbContextFactory<JellyfinDb> provider)+ IDbContextFactory<JellyfinDbContext> provider){_logger = logger;_localization = localization;diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.csindex fc03cd6ae4..ce1c54cbb2 100644--- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs+++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs@@ -15,13 +15,13 @@ namespace Jellyfin.Server.Implementations.Activity/// </summary>public class ActivityManager : IActivityManager{- private readonly IDbContextFactory<JellyfinDb> _provider;+ private readonly IDbContextFactory<JellyfinDbContext> _provider;/// <summary>/// Initializes a new instance of the <see cref="ActivityManager"/> class./// </summary>/// <param name="provider">The Jellyfin database provider.</param>- public ActivityManager(IDbContextFactory<JellyfinDb> provider)+ public ActivityManager(IDbContextFactory<JellyfinDbContext> provider){_provider = provider;}diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.csindex a9b974be0e..8b15d6823d 100644--- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs+++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs@@ -23,7 +23,7 @@ namespace Jellyfin.Server.Implementations.Devices/// </summary>public class DeviceManager : IDeviceManager{- private readonly IDbContextFactory<JellyfinDb> _dbProvider;+ private readonly IDbContextFactory<JellyfinDbContext> _dbProvider;private readonly IUserManager _userManager;private readonly ConcurrentDictionary<string, ClientCapabilities> _capabilitiesMap = new();@@ -32,7 +32,7 @@ namespace Jellyfin.Server.Implementations.Devices/// </summary>/// <param name="dbProvider">The database provider.</param>/// <param name="userManager">The user manager.</param>- public DeviceManager(IDbContextFactory<JellyfinDb> dbProvider, IUserManager userManager)+ public DeviceManager(IDbContextFactory<JellyfinDbContext> dbProvider, IUserManager userManager){_dbProvider = dbProvider;_userManager = userManager;diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.csindex 05c6229316..de64911b42 100644--- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs+++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs@@ -29,7 +29,7 @@ public static class ServiceCollectionExtensions.SkipCachingResults(result =>result.Value is null || (result.Value is EFTableRows rows && rows.RowsCount == 0)));- serviceCollection.AddPooledDbContextFactory<JellyfinDb>((serviceProvider, opt) =>+ serviceCollection.AddPooledDbContextFactory<JellyfinDbContext>((serviceProvider, opt) =>{var applicationPaths = serviceProvider.GetRequiredService<IApplicationPaths>();var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();diff --git a/Jellyfin.Server.Implementations/JellyfinDb.cs b/Jellyfin.Server.Implementations/JellyfinDbContext.cssimilarity index 96%rename from Jellyfin.Server.Implementations/JellyfinDb.csrename to Jellyfin.Server.Implementations/JellyfinDbContext.csindex 064118ca54..0d91707e3e 100644--- a/Jellyfin.Server.Implementations/JellyfinDb.cs+++ b/Jellyfin.Server.Implementations/JellyfinDbContext.cs@@ -8,13 +8,13 @@ using Microsoft.EntityFrameworkCore;namespace Jellyfin.Server.Implementations;/// <inheritdoc/>-public class JellyfinDb : DbContext+public class JellyfinDbContext : DbContext{/// <summary>- /// Initializes a new instance of the <see cref="JellyfinDb"/> class.+ /// Initializes a new instance of the <see cref="JellyfinDbContext"/> class./// </summary>/// <param name="options">The database context options.</param>- public JellyfinDb(DbContextOptions<JellyfinDb> options) : base(options)+ public JellyfinDbContext(DbContextOptions<JellyfinDbContext> options) : base(options){}@@ -183,6 +183,6 @@ public class JellyfinDb : DbContextbase.OnModelCreating(modelBuilder);// Configuration for each entity is in it's own class inside 'ModelConfiguration'.- modelBuilder.ApplyConfigurationsFromAssembly(typeof(JellyfinDb).Assembly);+ modelBuilder.ApplyConfigurationsFromAssembly(typeof(JellyfinDbContext).Assembly);}}diff --git a/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.Designer.csindex 98a83b7450..4be6c2faa3 100644--- a/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20200514181226_AddActivityLog")]partial class AddActivityLog{diff --git a/Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.Designer.csindex 6342ce9cf3..f3254734ad 100644--- a/Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20200613202153_AddUsers")]partial class AddUsers{diff --git a/Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.Designer.csindex d44707d069..12d6faa8f5 100644--- a/Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20200728005145_AddDisplayPreferences")]partial class AddDisplayPreferences{diff --git a/Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.csindex 2234f9d5fd..f1cc208058 100644--- a/Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20200905220533_FixDisplayPreferencesIndex")]partial class FixDisplayPreferencesIndex{diff --git a/Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.Designer.csindex e5c326a326..f134d363c8 100644--- a/Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20201004171403_AddMaxActiveSessions")]partial class AddMaxActiveSessions{diff --git a/Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.csindex 10663d0655..ec65205d45 100644--- a/Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs@@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20201204223655_AddCustomDisplayPreferences")]partial class AddCustomDisplayPreferences{diff --git a/Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.Designer.csindex 8696768245..45dad6be68 100644--- a/Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20210320181425_AddIndexesAndCollations")]partial class AddIndexesAndCollations{diff --git a/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.csindex d332d19f28..eff84b4574 100644--- a/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs@@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20210407110544_NullableCustomPrefValue")]partial class NullableCustomPrefValue{diff --git a/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.csindex 7e9566e2ea..ad7c2dd2c9 100644--- a/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.cs@@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20210814002109_AddDevices")]partial class AddDevices{diff --git a/Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.csindex 03e3f3c921..f9497a3b69 100644--- a/Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs+++ b/Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs@@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))][Migration("20221022080052_AddIndexActivityLogsDateCreated")]partial class AddIndexActivityLogsDateCreated{diff --git a/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs b/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.csindex 72a4a8c3b6..940cf7c5d5 100644--- a/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs+++ b/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs@@ -4,17 +4,17 @@ using Microsoft.EntityFrameworkCore.Design;namespace Jellyfin.Server.Implementations.Migrations{/// <summary>- /// The design time factory for <see cref="JellyfinDb"/>.+ /// The design time factory for <see cref="JellyfinDbContext"/>./// This is only used for the creation of migrations and not during runtime./// </summary>- internal class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory<JellyfinDb>+ internal class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory<JellyfinDbContext>{- public JellyfinDb CreateDbContext(string[] args)+ public JellyfinDbContext CreateDbContext(string[] args){- var optionsBuilder = new DbContextOptionsBuilder<JellyfinDb>();+ var optionsBuilder = new DbContextOptionsBuilder<JellyfinDbContext>();optionsBuilder.UseSqlite("Data Source=jellyfin.db");- return new JellyfinDb(optionsBuilder.Options);+ return new JellyfinDbContext(optionsBuilder.Options);}}}diff --git a/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs b/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.csindex 2dd7b094aa..dd5f7f0121 100644--- a/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs+++ b/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs@@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;namespace Jellyfin.Server.Implementations.Migrations{- [DbContext(typeof(JellyfinDb))]+ [DbContext(typeof(JellyfinDbContext))]partial class JellyfinDbModelSnapshot : ModelSnapshot{protected override void BuildModel(ModelBuilder modelBuilder)diff --git a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs b/Jellyfin.Server.Implementations/Security/AuthenticationManager.csindex 1b56237fe7..b2dfe60a14 100644--- a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs+++ b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs@@ -10,13 +10,13 @@ namespace Jellyfin.Server.Implementations.Security/// <inheritdoc />public class AuthenticationManager : IAuthenticationManager{- private readonly IDbContextFactory<JellyfinDb> _dbProvider;+ private readonly IDbContextFactory<JellyfinDbContext> _dbProvider;/// <summary>/// Initializes a new instance of the <see cref="AuthenticationManager"/> class./// </summary>/// <param name="dbProvider">The database provider.</param>- public AuthenticationManager(IDbContextFactory<JellyfinDb> dbProvider)+ public AuthenticationManager(IDbContextFactory<JellyfinDbContext> dbProvider){_dbProvider = dbProvider;}diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.csindex ec5742bab0..63d3e8a04c 100644--- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs+++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs@@ -16,12 +16,12 @@ namespace Jellyfin.Server.Implementations.Security{public class AuthorizationContext : IAuthorizationContext{- private readonly IDbContextFactory<JellyfinDb> _jellyfinDbProvider;+ private readonly IDbContextFactory<JellyfinDbContext> _jellyfinDbProvider;private readonly IUserManager _userManager;private readonly IServerApplicationHost _serverApplicationHost;public AuthorizationContext(- IDbContextFactory<JellyfinDb> jellyfinDb,+ IDbContextFactory<JellyfinDbContext> jellyfinDb,IUserManager userManager,IServerApplicationHost serverApplicationHost){diff --git a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.csindex 8936f57c62..bfae81e4ca 100644--- a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs+++ b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs@@ -15,13 +15,13 @@ namespace Jellyfin.Server.Implementations.Users/// </summary>public class DisplayPreferencesManager : IDisplayPreferencesManager{- private readonly JellyfinDb _dbContext;+ private readonly JellyfinDbContext _dbContext;/// <summary>/// Initializes a new instance of the <see cref="DisplayPreferencesManager"/> class./// </summary>/// <param name="dbContextFactory">The database context factory.</param>- public DisplayPreferencesManager(IDbContextFactory<JellyfinDb> dbContextFactory)+ public DisplayPreferencesManager(IDbContextFactory<JellyfinDbContext> dbContextFactory){_dbContext = dbContextFactory.CreateDbContext();}diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.csindex 266bff5e8d..dc9d78857e 100644--- a/Jellyfin.Server.Implementations/Users/UserManager.cs+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs@@ -33,7 +33,7 @@ namespace Jellyfin.Server.Implementations.Users/// </summary>public class UserManager : IUserManager{- private readonly IDbContextFactory<JellyfinDb> _dbProvider;+ private readonly IDbContextFactory<JellyfinDbContext> _dbProvider;private readonly IEventManager _eventManager;private readonly ICryptoProvider _cryptoProvider;private readonly INetworkManager _networkManager;@@ -59,7 +59,7 @@ namespace Jellyfin.Server.Implementations.Users/// <param name="imageProcessor">The image processor.</param>/// <param name="logger">The logger.</param>public UserManager(- IDbContextFactory<JellyfinDb> dbProvider,+ IDbContextFactory<JellyfinDbContext> dbProvider,IEventManager eventManager,ICryptoProvider cryptoProvider,INetworkManager networkManager,@@ -172,7 +172,7 @@ namespace Jellyfin.Server.Implementations.Users}}- internal async Task<User> CreateUserInternalAsync(string name, JellyfinDb dbContext)+ internal async Task<User> CreateUserInternalAsync(string name, JellyfinDbContext dbContext){// TODO: Remove after user item data is migrated.var max = await dbContext.Users.AsQueryable().AnyAsync().ConfigureAwait(false)@@ -886,7 +886,7 @@ namespace Jellyfin.Server.Implementations.Usersawait UpdateUserAsync(user).ConfigureAwait(false);}- private async Task UpdateUserInternalAsync(JellyfinDb dbContext, User user)+ private async Task UpdateUserInternalAsync(JellyfinDbContext dbContext, User user){dbContext.Users.Update(user);_users[user.Id] = user;diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.csindex d70b8f3ab7..40cd5a0446 100644--- a/Jellyfin.Server/CoreAppHost.cs+++ b/Jellyfin.Server/CoreAppHost.cs@@ -107,7 +107,7 @@ namespace Jellyfin.Serveryield return typeof(CoreAppHost).Assembly;// Jellyfin.Server.Implementations- yield return typeof(JellyfinDb).Assembly;+ yield return typeof(JellyfinDbContext).Assembly;}/// <inheritdoc />diff --git a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.csindex bf66f75ff9..e8a0af9f88 100644--- a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs+++ b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs@@ -19,7 +19,7 @@ namespace Jellyfin.Server.Migrations.Routinesprivate const string DbFilename = "activitylog.db";private readonly ILogger<MigrateActivityLogDb> _logger;- private readonly IDbContextFactory<JellyfinDb> _provider;+ private readonly IDbContextFactory<JellyfinDbContext> _provider;private readonly IServerApplicationPaths _paths;/// <summary>@@ -28,7 +28,7 @@ namespace Jellyfin.Server.Migrations.Routines/// <param name="logger">The logger.</param>/// <param name="paths">The server application paths.</param>/// <param name="provider">The database provider.</param>- public MigrateActivityLogDb(ILogger<MigrateActivityLogDb> logger, IServerApplicationPaths paths, IDbContextFactory<JellyfinDb> provider)+ public MigrateActivityLogDb(ILogger<MigrateActivityLogDb> logger, IServerApplicationPaths paths, IDbContextFactory<JellyfinDbContext> provider){_logger = logger;_provider = provider;diff --git a/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.csindex bf1ea8233d..09daae0ff9 100644--- a/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs+++ b/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs@@ -20,7 +20,7 @@ namespace Jellyfin.Server.Migrations.Routinesprivate const string DbFilename = "authentication.db";private readonly ILogger<MigrateAuthenticationDb> _logger;- private readonly IDbContextFactory<JellyfinDb> _dbProvider;+ private readonly IDbContextFactory<JellyfinDbContext> _dbProvider;private readonly IServerApplicationPaths _appPaths;private readonly IUserManager _userManager;@@ -33,7 +33,7 @@ namespace Jellyfin.Server.Migrations.Routines/// <param name="userManager">The user manager.</param>public MigrateAuthenticationDb(ILogger<MigrateAuthenticationDb> logger,- IDbContextFactory<JellyfinDb> dbProvider,+ IDbContextFactory<JellyfinDbContext> dbProvider,IServerApplicationPaths appPaths,IUserManager userManager){diff --git a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.csindex 0fad77cfe6..4b692d14f0 100644--- a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs+++ b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs@@ -25,7 +25,7 @@ namespace Jellyfin.Server.Migrations.Routinesprivate readonly ILogger<MigrateDisplayPreferencesDb> _logger;private readonly IServerApplicationPaths _paths;- private readonly IDbContextFactory<JellyfinDb> _provider;+ private readonly IDbContextFactory<JellyfinDbContext> _provider;private readonly JsonSerializerOptions _jsonOptions;private readonly IUserManager _userManager;@@ -39,7 +39,7 @@ namespace Jellyfin.Server.Migrations.Routinespublic MigrateDisplayPreferencesDb(ILogger<MigrateDisplayPreferencesDb> logger,IServerApplicationPaths paths,- IDbContextFactory<JellyfinDb> provider,+ IDbContextFactory<JellyfinDbContext> provider,IUserManager userManager){_logger = logger;diff --git a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.csindex 2dbd82e8fd..ea2f033027 100644--- a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs+++ b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs@@ -27,7 +27,7 @@ namespace Jellyfin.Server.Migrations.Routinesprivate readonly ILogger<MigrateUserDb> _logger;private readonly IServerApplicationPaths _paths;- private readonly IDbContextFactory<JellyfinDb> _provider;+ private readonly IDbContextFactory<JellyfinDbContext> _provider;private readonly IXmlSerializer _xmlSerializer;/// <summary>@@ -40,7 +40,7 @@ namespace Jellyfin.Server.Migrations.Routinespublic MigrateUserDb(ILogger<MigrateUserDb> logger,IServerApplicationPaths paths,- IDbContextFactory<JellyfinDb> provider,+ IDbContextFactory<JellyfinDbContext> provider,IXmlSerializer xmlSerializer){_logger = logger;diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.csindex 540375dce6..70d7a07011 100644--- a/Jellyfin.Server/Program.cs+++ b/Jellyfin.Server/Program.cs@@ -236,7 +236,7 @@ namespace Jellyfin.Server{_logger.LogInformation("Running query planner optimizations in the database... This might take a while");// Run before disposing the application- var context = await appHost.ServiceProvider.GetRequiredService<IDbContextFactory<JellyfinDb>>().CreateDbContextAsync().ConfigureAwait(false);+ var context = await appHost.ServiceProvider.GetRequiredService<IDbContextFactory<JellyfinDbContext>>().CreateDbContextAsync().ConfigureAwait(false);await using (context.ConfigureAwait(false)){if (context.Database.IsSqlite())diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.csindex f89f81c766..c5f20b205b 100644--- a/Jellyfin.Server/Startup.cs+++ b/Jellyfin.Server/Startup.cs@@ -119,7 +119,7 @@ namespace Jellyfin.Server.ConfigurePrimaryHttpMessageHandler(defaultHttpClientHandlerDelegate);services.AddHealthChecks()- .AddCheck<DbContextFactoryHealthCheck<JellyfinDb>>(nameof(JellyfinDb));+ .AddCheck<DbContextFactoryHealthCheck<JellyfinDbContext>>(nameof(JellyfinDbContext));services.AddHlsPlaylistGenerator();}