diff --git a/Jellyfin.Server.Implementations/JellyfinDb.cs b/Jellyfin.Server.Implementations/JellyfinDb.cs index 6443100806..5d3fc9e7db 100644 --- a/Jellyfin.Server.Implementations/JellyfinDb.cs +++ b/Jellyfin.Server.Implementations/JellyfinDb.cs @@ -1,4 +1,3 @@ -#nullable disable #pragma warning disable CS1591 using System; @@ -21,118 +20,113 @@ public class JellyfinDb : DbContext { } - /// - /// Gets or sets the default connection string. - /// - public static string ConnectionString { get; set; } = @"Data Source=jellyfin.db"; - - public virtual DbSet AccessSchedules { get; set; } + public DbSet AccessSchedules => Set(); - public virtual DbSet ActivityLogs { get; set; } + public DbSet ActivityLogs => Set(); - public virtual DbSet ApiKeys { get; set; } + public DbSet ApiKeys => Set(); - public virtual DbSet Devices { get; set; } + public DbSet Devices => Set(); - public virtual DbSet DeviceOptions { get; set; } + public DbSet DeviceOptions => Set(); - public virtual DbSet DisplayPreferences { get; set; } + public DbSet DisplayPreferences => Set(); - public virtual DbSet ImageInfos { get; set; } + public DbSet ImageInfos => Set(); - public virtual DbSet ItemDisplayPreferences { get; set; } + public DbSet ItemDisplayPreferences => Set(); - public virtual DbSet CustomItemDisplayPreferences { get; set; } + public DbSet CustomItemDisplayPreferences => Set(); - public virtual DbSet Permissions { get; set; } + public DbSet Permissions => Set(); - public virtual DbSet Preferences { get; set; } + public DbSet Preferences => Set(); - public virtual DbSet Users { get; set; } + public DbSet Users => Set(); - /*public virtual DbSet Artwork { get; set; } + /*public DbSet Artwork => Set(); - public virtual DbSet Books { get; set; } + public DbSet Books => Set(); - public virtual DbSet BookMetadata { get; set; } + public DbSet BookMetadata => Set(); - public virtual DbSet Chapters { get; set; } + public DbSet Chapters => Set(); - public virtual DbSet Collections { get; set; } + public DbSet Collections => Set(); - public virtual DbSet CollectionItems { get; set; } + public DbSet CollectionItems => Set(); - public virtual DbSet Companies { get; set; } + public DbSet Companies => Set(); - public virtual DbSet CompanyMetadata { get; set; } + public DbSet CompanyMetadata => Set(); - public virtual DbSet CustomItems { get; set; } + public DbSet CustomItems => Set(); - public virtual DbSet CustomItemMetadata { get; set; } + public DbSet CustomItemMetadata => Set(); - public virtual DbSet Episodes { get; set; } + public DbSet Episodes => Set(); - public virtual DbSet EpisodeMetadata { get; set; } + public DbSet EpisodeMetadata => Set(); - public virtual DbSet Genres { get; set; } + public DbSet Genres => Set(); - public virtual DbSet Groups { get; set; } + public DbSet Groups => Set(); - public virtual DbSet Libraries { get; set; } + public DbSet Libraries => Set(); - public virtual DbSet LibraryItems { get; set; } + public DbSet LibraryItems => Set(); - public virtual DbSet LibraryRoot { get; set; } + public DbSet LibraryRoot => Set(); - public virtual DbSet MediaFiles { get; set; } + public DbSet MediaFiles => Set(); - public virtual DbSet MediaFileStream { get; set; } + public DbSet MediaFileStream => Set(); - public virtual DbSet Metadata { get; set; } + public DbSet Metadata => Set(); - public virtual DbSet MetadataProviders { get; set; } + public DbSet MetadataProviders => Set(); - public virtual DbSet MetadataProviderIds { get; set; } + public DbSet MetadataProviderIds => Set(); - public virtual DbSet Movies { get; set; } + public DbSet Movies => Set(); - public virtual DbSet MovieMetadata { get; set; } + public DbSet MovieMetadata => Set(); - public virtual DbSet MusicAlbums { get; set; } + public DbSet MusicAlbums => Set(); - public virtual DbSet MusicAlbumMetadata { get; set; } + public DbSet MusicAlbumMetadata => Set(); - public virtual DbSet People { get; set; } + public DbSet People => Set(); - public virtual DbSet PersonRoles { get; set; } + public DbSet PersonRoles => Set(); - public virtual DbSet Photo { get; set; } + public DbSet Photo => Set(); - public virtual DbSet PhotoMetadata { get; set; } + public DbSet PhotoMetadata => Set(); - public virtual DbSet ProviderMappings { get; set; } + public DbSet ProviderMappings => Set(); - public virtual DbSet Ratings { get; set; } + public DbSet Ratings => Set(); /// /// Repository for global::Jellyfin.Data.Entities.RatingSource - This is the entity to /// store review ratings, not age ratings. /// - public virtual DbSet RatingSources { get; set; } + public DbSet RatingSources => Set(); - public virtual DbSet Releases { get; set; } + public DbSet Releases => Set(); - public virtual DbSet Seasons { get; set; } + public DbSet Seasons => Set(); - public virtual DbSet SeasonMetadata { get; set; } + public DbSet SeasonMetadata => Set(); - public virtual DbSet Series { get; set; } + public DbSet Series => Set(); - public virtual DbSet SeriesMetadata { get; set; } + public DbSet SeriesMetadata => Set Tracks { get; set; } + public DbSet Tracks => Set(); - public virtual DbSet TrackMetadata { get; set; }*/ + public DbSet TrackMetadata => Set();*/ /// public override int SaveChanges()