From aa811eb1e3c78bdf8f4a751311c1bb6d639e851e Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 26 Jan 2025 20:45:28 +0000 Subject: [PATCH 01/34] Prepared Seperation of Database components for future multi provider support --- .devcontainer/devcontainer.json | 14 ++ Directory.Packages.props | 1 + .../Emby.Server.Implementations.csproj | 1 + .../HttpServer/Security/AuthService.cs | 1 + .../Library/LibraryManager.cs | 1 + .../Library/MediaSourceManager.cs | 1 + .../Library/UserViewManager.cs | 1 + .../Tasks/OptimizeDatabaseTask.cs | 21 +- .../Session/SessionManager.cs | 1 + .../TV/TVSeriesManager.cs | 1 + .../Auth/CustomAuthenticationHandler.cs | 1 + .../DefaultAuthorizationHandler.cs | 1 + .../UserPermissionHandler.cs | 1 + Jellyfin.Api/Controllers/ItemsController.cs | 1 + Jellyfin.Api/Controllers/UserController.cs | 1 + Jellyfin.Api/Helpers/MediaInfoHelper.cs | 1 + .../ActivityLogWebSocketListener.cs | 1 + .../SessionInfoWebSocketListener.cs | 1 + Jellyfin.Data/Interfaces/IHasPermissions.cs | 31 --- Jellyfin.Data/Jellyfin.Data.csproj | 4 + Jellyfin.Data/UserEntityExtensions.cs | 220 ++++++++++++++++++ .../Entities/AccessSchedule.cs | 0 .../Entities/ActivityLog.cs | 0 .../Entities/AncestorId.cs | 0 .../Entities/AttachmentStreamInfo.cs | 0 .../Entities/BaseItemEntity.cs | 0 .../Entities/BaseItemExtraType.cs | 0 .../Entities/BaseItemImageInfo.cs | 0 .../Entities/BaseItemMetadataField.cs | 0 .../Entities/BaseItemProvider.cs | 0 .../Entities/BaseItemTrailerType.cs | 0 .../Entities/Chapter.cs | 0 .../Entities/CustomItemDisplayPreferences.cs | 0 .../Entities/DisplayPreferences.cs | 0 .../Entities/Group.cs | 12 - .../Entities/HomeSection.cs | 0 .../Entities/ImageInfo.cs | 0 .../Entities/ImageInfoImageType.cs | 0 .../Entities/ItemDisplayPreferences.cs | 0 .../Entities/ItemValue.cs | 0 .../Entities/ItemValueMap.cs | 0 .../Entities/ItemValueType.cs | 0 .../Entities/Libraries/Artwork.cs | 0 .../Entities/Libraries/Book.cs | 0 .../Entities/Libraries/BookMetadata.cs | 0 .../Entities/Libraries/Chapter.cs | 0 .../Entities/Libraries/Collection.cs | 0 .../Entities/Libraries/CollectionItem.cs | 0 .../Entities/Libraries/Company.cs | 0 .../Entities/Libraries/CompanyMetadata.cs | 0 .../Entities/Libraries/CustomItem.cs | 0 .../Entities/Libraries/CustomItemMetadata.cs | 0 .../Entities/Libraries/Episode.cs | 0 .../Entities/Libraries/EpisodeMetadata.cs | 0 .../Entities/Libraries/Genre.cs | 0 .../Entities/Libraries/ItemMetadata.cs | 0 .../Entities/Libraries/Library.cs | 0 .../Entities/Libraries/LibraryItem.cs | 0 .../Entities/Libraries/MediaFile.cs | 0 .../Entities/Libraries/MediaFileStream.cs | 0 .../Entities/Libraries/MetadataProvider.cs | 0 .../Entities/Libraries/MetadataProviderId.cs | 0 .../Entities/Libraries/Movie.cs | 0 .../Entities/Libraries/MovieMetadata.cs | 0 .../Entities/Libraries/MusicAlbum.cs | 0 .../Entities/Libraries/MusicAlbumMetadata.cs | 0 .../Entities/Libraries/Person.cs | 0 .../Entities/Libraries/PersonRole.cs | 0 .../Entities/Libraries/Photo.cs | 0 .../Entities/Libraries/PhotoMetadata.cs | 0 .../Entities/Libraries/Rating.cs | 0 .../Entities/Libraries/RatingSource.cs | 0 .../Entities/Libraries/Release.cs | 0 .../Entities/Libraries/Season.cs | 0 .../Entities/Libraries/SeasonMetadata.cs | 0 .../Entities/Libraries/Series.cs | 0 .../Entities/Libraries/SeriesMetadata.cs | 0 .../Entities/Libraries/Track.cs | 0 .../Entities/Libraries/TrackMetadata.cs | 0 .../Entities/MediaSegment.cs | 0 .../Entities/MediaStreamInfo.cs | 0 .../Entities/MediaStreamTypeEntity.cs | 0 .../Entities/People.cs | 0 .../Entities/PeopleBaseItemMap.cs | 0 .../Entities/Permission.cs | 0 .../Entities/Preference.cs | 0 .../Entities/ProgramAudioEntity.cs | 0 .../Entities/Security/ApiKey.cs | 0 .../Entities/Security/Device.cs | 0 .../Entities/Security/DeviceOptions.cs | 0 .../Entities/TrickplayInfo.cs | 0 .../Entities/User.cs | 196 ---------------- .../Entities/UserData.cs | 0 .../Enums/ArtKind.cs | 0 .../Enums/ChromecastVersion.cs | 0 .../Enums/DynamicDayOfWeek.cs | 0 .../Enums/HomeSectionType.cs | 0 .../Enums/IndexingKind.cs | 0 .../Enums/MediaFileKind.cs | 0 .../Enums/MediaSegmentType.cs | 0 .../Enums/PermissionKind.cs | 0 .../Enums/PersonRoleType.cs | 0 .../Enums/PreferenceKind.cs | 0 .../Enums/ScrollDirection.cs | 0 .../Enums/SortOrder.cs | 0 .../Enums/SubtitlePlaybackMode.cs | 0 .../Enums/SyncPlayUserAccessType.cs | 0 .../Enums/ViewType.cs | 0 .../IJellyfinDatabaseProvider.cs | 31 +++ .../Interfaces/IHasArtwork.cs | 0 .../Interfaces/IHasCompanies.cs | 0 .../Interfaces/IHasConcurrencyToken.cs | 0 .../Interfaces/IHasPermissions.cs | 17 ++ .../Interfaces/IHasReleases.cs | 0 .../Jellyfin.Database.Implementations.csproj | 43 ++++ .../JellyfinDatabaseProviderKeyAttribute.cs | 29 +++ .../JellyfinDbContext.cs | 5 +- .../ActivityLogConfiguration.cs | 0 .../AncestorIdConfiguration.cs | 0 .../ModelConfiguration/ApiKeyConfiguration.cs | 0 .../AttachmentStreamInfoConfiguration.cs | 0 .../BaseItemConfiguration.cs | 2 - .../BaseItemMetadataFieldConfiguration.cs | 4 - .../BaseItemProviderConfiguration.cs | 0 .../BaseItemTrailerTypeConfiguration.cs | 4 - .../ChapterConfiguration.cs | 0 ...stomItemDisplayPreferencesConfiguration.cs | 0 .../ModelConfiguration/DeviceConfiguration.cs | 0 .../DeviceOptionsConfiguration.cs | 0 .../DisplayPreferencesConfiguration.cs | 0 .../ItemValuesConfiguration.cs | 0 .../ItemValuesMapConfiguration.cs | 0 .../MediaStreamInfoConfiguration.cs | 0 .../PeopleBaseItemMapConfiguration.cs | 0 .../ModelConfiguration/PeopleConfiguration.cs | 0 .../PermissionConfiguration.cs | 0 .../PreferenceConfiguration.cs | 0 .../TrickplayInfoConfiguration.cs | 0 .../ModelConfiguration/UserConfiguration.cs | 0 .../UserDataConfiguration.cs | 0 .../Jellyfin.Database.Providers.PgSql.csproj | 51 ++++ .../Jellyfin.Database.Providers.SqLite.csproj | 51 ++++ .../20200514181226_AddActivityLog.Designer.cs | 0 .../20200514181226_AddActivityLog.cs | 0 .../20200613202153_AddUsers.Designer.cs | 0 .../Migrations/20200613202153_AddUsers.cs | 0 ...28005145_AddDisplayPreferences.Designer.cs | 0 .../20200728005145_AddDisplayPreferences.cs | 0 ...533_FixDisplayPreferencesIndex.Designer.cs | 0 ...200905220533_FixDisplayPreferencesIndex.cs | 0 ...004171403_AddMaxActiveSessions.Designer.cs | 0 .../20201004171403_AddMaxActiveSessions.cs | 0 ...55_AddCustomDisplayPreferences.Designer.cs | 0 ...01204223655_AddCustomDisplayPreferences.cs | 0 ...181425_AddIndexesAndCollations.Designer.cs | 0 .../20210320181425_AddIndexesAndCollations.cs | 0 ...110544_NullableCustomPrefValue.Designer.cs | 0 .../20210407110544_NullableCustomPrefValue.cs | 0 .../20210814002109_AddDevices.Designer.cs | 0 .../Migrations/20210814002109_AddDevices.cs | 0 ...ddIndexActivityLogsDateCreated.Designer.cs | 0 ...2080052_AddIndexActivityLogsDateCreated.cs | 0 ...30526173516_RemoveEasyPassword.Designer.cs | 0 .../20230526173516_RemoveEasyPassword.cs | 0 ...230626233818_AddTrickplayInfos.Designer.cs | 0 .../20230626233818_AddTrickplayInfos.cs | 0 ...0230923170422_UserCastReceiver.Designer.cs | 0 .../20230923170422_UserCastReceiver.cs | 0 ...0240729140605_AddMediaSegments.Designer.cs | 0 .../20240729140605_AddMediaSegments.cs | 0 ...rkSegmentProviderIdNonNullable.Designer.cs | 0 ...082930_MarkSegmentProviderIdNonNullable.cs | 0 ...41020103111_LibraryDbMigration.Designer.cs | 0 .../20241020103111_LibraryDbMigration.cs | 0 ...41111131257_AddedCustomDataKey.Designer.cs | 0 .../20241111131257_AddedCustomDataKey.cs | 0 ...11135439_AddedCustomDataKeyKey.Designer.cs | 0 .../20241111135439_AddedCustomDataKeyKey.cs | 0 ...1112152323_FixAncestorIdConfig.Designer.cs | 0 .../20241112152323_FixAncestorIdConfig.cs | 0 ...20241112232041_fixMediaStreams.Designer.cs | 0 .../20241112232041_fixMediaStreams.cs | 0 ...0241112234144_FixMediaStreams2.Designer.cs | 0 .../20241112234144_FixMediaStreams2.cs | 0 ...3133548_EnforceUniqueItemValue.Designer.cs | 0 .../20241113133548_EnforceUniqueItemValue.cs | 0 .../Migrations/DesignTimeJellyfinDbFactory.cs | 8 +- .../Migrations/JellyfinDbModelSnapshot.cs | 0 .../SqliteDatabaseProvider.cs | 78 +++++++ .../DatabaseConfigurationFactory.cs | 17 ++ .../DatabaseConfigurationOptions.cs | 14 ++ .../DatabaseConfigurationStore.cs | 25 ++ .../Devices/DeviceManager.cs | 1 + .../Extensions/ServiceCollectionExtensions.cs | 54 ++++- .../Jellyfin.Server.Implementations.csproj | 10 +- .../Users/DeviceAccessHost.cs | 1 + .../Users/UserManager.cs | 1 + Jellyfin.Server/Jellyfin.Server.csproj | 1 + .../Migrations/Routines/MigrateLibraryDb.cs | 19 +- .../Migrations/Routines/MigrateUserDb.cs | 1 + Jellyfin.Server/Program.cs | 18 +- Jellyfin.Server/Startup.cs | 2 +- Jellyfin.sln | 29 ++- MediaBrowser.Controller/Channels/Channel.cs | 1 + .../Entities/Audio/MusicAlbum.cs | 1 + .../Entities/Audio/MusicArtist.cs | 1 + MediaBrowser.Controller/Entities/BaseItem.cs | 1 + MediaBrowser.Controller/Entities/Folder.cs | 1 + .../Entities/InternalItemsQuery.cs | 1 + .../Entities/Movies/BoxSet.cs | 1 + MediaBrowser.Controller/Entities/TV/Series.cs | 2 +- .../Entities/UserViewBuilder.cs | 1 + .../MediaEncoding/EncodingHelper.cs | 1 + MediaBrowser.Controller/Playlists/Playlist.cs | 1 + .../Transcoding/TranscodeManager.cs | 1 + src/Jellyfin.LiveTv/LiveTvManager.cs | 1 + .../Recordings/RecordingNotifier.cs | 1 + .../Auth/CustomAuthenticationHandlerTests.cs | 1 + tests/Jellyfin.Api.Tests/TestHelpers.cs | 1 + .../EfMigrations/EfMigrationTests.cs | 15 +- 220 files changed, 742 insertions(+), 320 deletions(-) delete mode 100644 Jellyfin.Data/Interfaces/IHasPermissions.cs create mode 100644 Jellyfin.Data/UserEntityExtensions.cs rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/AccessSchedule.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ActivityLog.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/AncestorId.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/AttachmentStreamInfo.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/BaseItemEntity.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/BaseItemExtraType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/BaseItemImageInfo.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/BaseItemMetadataField.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/BaseItemProvider.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/BaseItemTrailerType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Chapter.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/CustomItemDisplayPreferences.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/DisplayPreferences.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Group.cs (84%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/HomeSection.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ImageInfo.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ImageInfoImageType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ItemDisplayPreferences.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ItemValue.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ItemValueMap.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ItemValueType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Artwork.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Book.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/BookMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Chapter.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Collection.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/CollectionItem.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Company.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/CompanyMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/CustomItem.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/CustomItemMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Episode.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/EpisodeMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Genre.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/ItemMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Library.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/LibraryItem.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MediaFile.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MediaFileStream.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MetadataProvider.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MetadataProviderId.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Movie.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MovieMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MusicAlbum.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/MusicAlbumMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Person.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/PersonRole.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Photo.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/PhotoMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Rating.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/RatingSource.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Release.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Season.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/SeasonMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Series.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/SeriesMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/Track.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Libraries/TrackMetadata.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/MediaSegment.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/MediaStreamInfo.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/MediaStreamTypeEntity.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/People.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/PeopleBaseItemMap.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Permission.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Preference.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/ProgramAudioEntity.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Security/ApiKey.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Security/Device.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/Security/DeviceOptions.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/TrickplayInfo.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/User.cs (56%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Entities/UserData.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/ArtKind.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/ChromecastVersion.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/DynamicDayOfWeek.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/HomeSectionType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/IndexingKind.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/MediaFileKind.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/MediaSegmentType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/PermissionKind.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/PersonRoleType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/PreferenceKind.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/ScrollDirection.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/SortOrder.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/SubtitlePlaybackMode.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/SyncPlayUserAccessType.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Enums/ViewType.cs (100%) create mode 100644 Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Interfaces/IHasArtwork.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Interfaces/IHasCompanies.cs (100%) rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Interfaces/IHasConcurrencyToken.cs (100%) create mode 100644 Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs rename {Jellyfin.Data => Jellyfin.Database/Jellyfin.Database.Implementations}/Interfaces/IHasReleases.cs (100%) create mode 100644 Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj create mode 100644 Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/JellyfinDbContext.cs (96%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/ActivityLogConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/AncestorIdConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/ApiKeyConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/AttachmentStreamInfoConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/BaseItemConfiguration.cs (98%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs (87%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/BaseItemProviderConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs (87%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/ChapterConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/DeviceConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/DeviceOptionsConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/DisplayPreferencesConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/ItemValuesConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/ItemValuesMapConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/MediaStreamInfoConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/PeopleBaseItemMapConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/PeopleConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/PermissionConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/PreferenceConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/TrickplayInfoConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/UserConfiguration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/ModelConfiguration/UserDataConfiguration.cs (100%) create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200514181226_AddActivityLog.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200514181226_AddActivityLog.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200613202153_AddUsers.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200613202153_AddUsers.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200728005145_AddDisplayPreferences.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200728005145_AddDisplayPreferences.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20200905220533_FixDisplayPreferencesIndex.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20201004171403_AddMaxActiveSessions.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20201204223655_AddCustomDisplayPreferences.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20210320181425_AddIndexesAndCollations.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20210407110544_NullableCustomPrefValue.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20210814002109_AddDevices.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20210814002109_AddDevices.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20230526173516_RemoveEasyPassword.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20230526173516_RemoveEasyPassword.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20230626233818_AddTrickplayInfos.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20230626233818_AddTrickplayInfos.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20230923170422_UserCastReceiver.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20230923170422_UserCastReceiver.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20240729140605_AddMediaSegments.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20240729140605_AddMediaSegments.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241020103111_LibraryDbMigration.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241020103111_LibraryDbMigration.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241111131257_AddedCustomDataKey.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241111131257_AddedCustomDataKey.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241111135439_AddedCustomDataKeyKey.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241112152323_FixAncestorIdConfig.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241112232041_fixMediaStreams.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241112232041_fixMediaStreams.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241112234144_FixMediaStreams2.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241112234144_FixMediaStreams2.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/20241113133548_EnforceUniqueItemValue.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/DesignTimeJellyfinDbFactory.cs (61%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/Migrations/JellyfinDbModelSnapshot.cs (100%) create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs create mode 100644 Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationFactory.cs create mode 100644 Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs create mode 100644 Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 228d4a17c8..bcf484463b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,5 +24,19 @@ "hostRequirements": { "memory": "8gb", "cpus": 4 + }, "remoteEnv": { + "JELLYFIN_DATA_DIR": "/config" + }, + "mounts": [ + "source=/opt/docker/data/jellyfin/testConfig/,target=/config,type=bind,consistency=cached", + "source=/opt/docker/data/jellyfin/config10.9.11/metadata,target=/config/metadata,type=bind,consistency=cached", + "source=/mnt/video,target=/media,type=bind,consistency=cached" + ], + "customizations": { + "vscode": { + "extensions": [ + "alexcvzz.vscode-sqlite" + ] + } } } diff --git a/Directory.Packages.props b/Directory.Packages.props index c85d0c0328..526ca37708 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -31,6 +31,7 @@ + diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 70dd5eb9ae..c94ff924c5 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -18,6 +18,7 @@ + diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs index 1d04f3da37..82945a4f62 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs @@ -1,6 +1,7 @@ #pragma warning disable CS1591 using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Net; using Microsoft.AspNetCore.Http; diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 93ee47fe81..1fc9ccb141 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -18,6 +18,7 @@ using Emby.Server.Implementations.Library.Validators; using Emby.Server.Implementations.Playlists; using Emby.Server.Implementations.ScheduledTasks.Tasks; using Emby.Server.Implementations.Sorting; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index d0f5e60f79..669db65f7d 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -13,6 +13,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index e9cf47d462..b4e05ebf03 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs index 7d4e2377dc..05223d28ae 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs @@ -18,6 +18,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks private readonly ILogger _logger; private readonly ILocalizationManager _localization; private readonly IDbContextFactory _provider; + private readonly IJellyfinDatabaseProvider _jellyfinDatabaseProvider; /// /// Initializes a new instance of the class. @@ -25,14 +26,17 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. + /// Instance of the JellyfinDatabaseProvider that can be used for provider specific operations. public OptimizeDatabaseTask( ILogger logger, ILocalizationManager localization, - IDbContextFactory provider) + IDbContextFactory provider, + IJellyfinDatabaseProvider jellyfinDatabaseProvider) { _logger = logger; _localization = localization; _provider = provider; + _jellyfinDatabaseProvider = jellyfinDatabaseProvider; } /// @@ -73,20 +77,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks try { - var context = await _provider.CreateDbContextAsync(cancellationToken).ConfigureAwait(false); - await using (context.ConfigureAwait(false)) - { - if (context.Database.IsSqlite()) - { - await context.Database.ExecuteSqlRawAsync("PRAGMA optimize", cancellationToken).ConfigureAwait(false); - await context.Database.ExecuteSqlRawAsync("VACUUM", cancellationToken).ConfigureAwait(false); - _logger.LogInformation("jellyfin.db optimized successfully!"); - } - else - { - _logger.LogInformation("This database doesn't support optimization"); - } - } + await _jellyfinDatabaseProvider.RunScheduledOptimisation(cancellationToken).ConfigureAwait(false); } catch (Exception e) { diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index fe2c3d24f6..d9ab9bc1dd 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Entities.Security; using Jellyfin.Data.Enums; diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index f8ce473da3..39e751ca64 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs index 2853e69b01..19c35fc6ac 100644 --- a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs +++ b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs @@ -3,6 +3,7 @@ using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; using Jellyfin.Api.Constants; +using Jellyfin.Data; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; diff --git a/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs b/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs index 4928d5ed24..07dedb017a 100644 --- a/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs +++ b/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionHandler.cs b/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionHandler.cs index f20779f6cd..d139eab16f 100644 --- a/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionHandler.cs +++ b/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionHandler.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Jellyfin.Api.Extensions; +using Jellyfin.Data; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Library; diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index 775d723b0b..d9ebf06674 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -4,6 +4,7 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Controllers/UserController.cs b/Jellyfin.Api/Controllers/UserController.cs index d7886d247f..838578fab8 100644 --- a/Jellyfin.Api/Controllers/UserController.cs +++ b/Jellyfin.Api/Controllers/UserController.cs @@ -7,6 +7,7 @@ using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.Models.UserDtos; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Api; diff --git a/Jellyfin.Api/Helpers/MediaInfoHelper.cs b/Jellyfin.Api/Helpers/MediaInfoHelper.cs index 4adda0b695..2c45789d34 100644 --- a/Jellyfin.Api/Helpers/MediaInfoHelper.cs +++ b/Jellyfin.Api/Helpers/MediaInfoHelper.cs @@ -7,6 +7,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Extensions; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs b/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs index 99516e9384..c472abdf06 100644 --- a/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs +++ b/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using MediaBrowser.Controller.Authentication; diff --git a/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs b/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs index a6cfe4d56c..f4031be361 100644 --- a/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs +++ b/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Library; diff --git a/Jellyfin.Data/Interfaces/IHasPermissions.cs b/Jellyfin.Data/Interfaces/IHasPermissions.cs deleted file mode 100644 index bf8ec9d887..0000000000 --- a/Jellyfin.Data/Interfaces/IHasPermissions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; - -namespace Jellyfin.Data.Interfaces -{ - /// - /// An abstraction representing an entity that has permissions. - /// - public interface IHasPermissions - { - /// - /// Gets a collection containing this entity's permissions. - /// - ICollection Permissions { get; } - - /// - /// Checks whether this entity has the specified permission kind. - /// - /// The kind of permission. - /// true if this entity has the specified permission, false otherwise. - bool HasPermission(PermissionKind kind); - - /// - /// Sets the specified permission to the provided value. - /// - /// The kind of permission. - /// The value to set. - void SetPermission(PermissionKind kind, bool value); - } -} diff --git a/Jellyfin.Data/Jellyfin.Data.csproj b/Jellyfin.Data/Jellyfin.Data.csproj index 921cf2d8c1..432f1846e5 100644 --- a/Jellyfin.Data/Jellyfin.Data.csproj +++ b/Jellyfin.Data/Jellyfin.Data.csproj @@ -38,6 +38,10 @@ + + + + diff --git a/Jellyfin.Data/UserEntityExtensions.cs b/Jellyfin.Data/UserEntityExtensions.cs new file mode 100644 index 0000000000..8d84a6b6e1 --- /dev/null +++ b/Jellyfin.Data/UserEntityExtensions.cs @@ -0,0 +1,220 @@ +using System; +using System.ComponentModel; +using System.Linq; +using Jellyfin.Data.Entities; +using Jellyfin.Data.Enums; +using Jellyfin.Data.Interfaces; + +namespace Jellyfin.Data; + +/// +/// Contains extension methods for manipulation of entities. +/// +public static class UserEntityExtensions +{ + /// + /// The values being delimited here are Guids, so commas work as they do not appear in Guids. + /// + private const char Delimiter = ','; + + /// + /// Checks whether the user has the specified permission. + /// + /// The entity to update. + /// The permission kind. + /// True if the user has the specified permission. + public static bool HasPermission(this IHasPermissions entity, PermissionKind kind) + { + return entity.Permissions.FirstOrDefault(p => p.Kind == kind)?.Value ?? false; + } + + /// + /// Sets the given permission kind to the provided value. + /// + /// The entity to update. + /// The permission kind. + /// The value to set. + public static void SetPermission(this IHasPermissions entity, PermissionKind kind, bool value) + { + var currentPermission = entity.Permissions.FirstOrDefault(p => p.Kind == kind); + if (currentPermission is null) + { + entity.Permissions.Add(new Permission(kind, value)); + } + else + { + currentPermission.Value = value; + } + } + + /// + /// Gets the user's preferences for the given preference kind. + /// + /// The entity to update. + /// The preference kind. + /// A string array containing the user's preferences. + public static string[] GetPreference(this User entity, PreferenceKind preference) + { + var val = entity.Preferences.FirstOrDefault(p => p.Kind == preference)?.Value; + + return string.IsNullOrEmpty(val) ? Array.Empty() : val.Split(Delimiter); + } + + /// + /// Gets the user's preferences for the given preference kind. + /// + /// The entity to update. + /// The preference kind. + /// Type of preference. + /// A {T} array containing the user's preference. + public static T[] GetPreferenceValues(this User entity, PreferenceKind preference) + { + var val = entity.Preferences.FirstOrDefault(p => p.Kind == preference)?.Value; + if (string.IsNullOrEmpty(val)) + { + return Array.Empty(); + } + + // Convert array of {string} to array of {T} + var converter = TypeDescriptor.GetConverter(typeof(T)); + var stringValues = val.Split(Delimiter); + var convertedCount = 0; + var parsedValues = new T[stringValues.Length]; + for (var i = 0; i < stringValues.Length; i++) + { + try + { + var parsedValue = converter.ConvertFromString(stringValues[i].Trim()); + if (parsedValue is not null) + { + parsedValues[convertedCount++] = (T)parsedValue; + } + } + catch (FormatException) + { + // Unable to convert value + } + } + + return parsedValues[..convertedCount]; + } + + /// + /// Sets the specified preference to the given value. + /// + /// The entity to update. + /// The preference kind. + /// The values. + public static void SetPreference(this User entity, PreferenceKind preference, string[] values) + { + var value = string.Join(Delimiter, values); + var currentPreference = entity.Preferences.FirstOrDefault(p => p.Kind == preference); + if (currentPreference is null) + { + entity.Preferences.Add(new Preference(preference, value)); + } + else + { + currentPreference.Value = value; + } + } + + /// + /// Sets the specified preference to the given value. + /// + /// The entity to update. + /// The preference kind. + /// The values. + /// The type of value. + public static void SetPreference(this User entity, PreferenceKind preference, T[] values) + { + var value = string.Join(Delimiter, values); + var currentPreference = entity.Preferences.FirstOrDefault(p => p.Kind == preference); + if (currentPreference is null) + { + entity.Preferences.Add(new Preference(preference, value)); + } + else + { + currentPreference.Value = value; + } + } + + /// + /// Checks whether this user is currently allowed to use the server. + /// + /// The entity to update. + /// True if the current time is within an access schedule, or there are no access schedules. + public static bool IsParentalScheduleAllowed(this User entity) + { + return entity.AccessSchedules.Count == 0 + || entity.AccessSchedules.Any(i => IsParentalScheduleAllowed(i, DateTime.UtcNow)); + } + + /// + /// Checks whether the provided folder is in this user's grouped folders. + /// + /// The entity to update. + /// The Guid of the folder. + /// True if the folder is in the user's grouped folders. + public static bool IsFolderGrouped(this User entity, Guid id) + { + return Array.IndexOf(GetPreferenceValues(entity, PreferenceKind.GroupedFolders), id) != -1; + } + + /// + /// Initializes the default permissions for a user. Should only be called on user creation. + /// + /// The entity to update. + // TODO: make these user configurable? + public static void AddDefaultPermissions(this User entity) + { + entity.Permissions.Add(new Permission(PermissionKind.IsAdministrator, false)); + entity.Permissions.Add(new Permission(PermissionKind.IsDisabled, false)); + entity.Permissions.Add(new Permission(PermissionKind.IsHidden, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableAllChannels, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableAllDevices, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableAllFolders, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableContentDeletion, false)); + entity.Permissions.Add(new Permission(PermissionKind.EnableContentDownloading, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableMediaConversion, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableMediaPlayback, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnablePlaybackRemuxing, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnablePublicSharing, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableRemoteAccess, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableSyncTranscoding, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableAudioPlaybackTranscoding, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableLiveTvAccess, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableLiveTvManagement, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableSharedDeviceControl, true)); + entity.Permissions.Add(new Permission(PermissionKind.EnableVideoPlaybackTranscoding, true)); + entity.Permissions.Add(new Permission(PermissionKind.ForceRemoteSourceTranscoding, false)); + entity.Permissions.Add(new Permission(PermissionKind.EnableRemoteControlOfOtherUsers, false)); + entity.Permissions.Add(new Permission(PermissionKind.EnableCollectionManagement, false)); + entity.Permissions.Add(new Permission(PermissionKind.EnableSubtitleManagement, false)); + entity.Permissions.Add(new Permission(PermissionKind.EnableLyricManagement, false)); + } + + /// + /// Initializes the default preferences. Should only be called on user creation. + /// + /// The entity to update. + public static void AddDefaultPreferences(this User entity) + { + foreach (var val in Enum.GetValues()) + { + entity.Preferences.Add(new Preference(val, string.Empty)); + } + } + + private static bool IsParentalScheduleAllowed(AccessSchedule schedule, DateTime date) + { + var localTime = date.ToLocalTime(); + var hour = localTime.TimeOfDay.TotalHours; + var currentDayOfWeek = localTime.DayOfWeek; + + return schedule.DayOfWeek.Contains(currentDayOfWeek) + && hour >= schedule.StartHour + && hour <= schedule.EndHour; + } +} diff --git a/Jellyfin.Data/Entities/AccessSchedule.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs similarity index 100% rename from Jellyfin.Data/Entities/AccessSchedule.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs diff --git a/Jellyfin.Data/Entities/ActivityLog.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs similarity index 100% rename from Jellyfin.Data/Entities/ActivityLog.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs diff --git a/Jellyfin.Data/Entities/AncestorId.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs similarity index 100% rename from Jellyfin.Data/Entities/AncestorId.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs diff --git a/Jellyfin.Data/Entities/AttachmentStreamInfo.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs similarity index 100% rename from Jellyfin.Data/Entities/AttachmentStreamInfo.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs diff --git a/Jellyfin.Data/Entities/BaseItemEntity.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs similarity index 100% rename from Jellyfin.Data/Entities/BaseItemEntity.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs diff --git a/Jellyfin.Data/Entities/BaseItemExtraType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs similarity index 100% rename from Jellyfin.Data/Entities/BaseItemExtraType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs diff --git a/Jellyfin.Data/Entities/BaseItemImageInfo.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs similarity index 100% rename from Jellyfin.Data/Entities/BaseItemImageInfo.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs diff --git a/Jellyfin.Data/Entities/BaseItemMetadataField.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs similarity index 100% rename from Jellyfin.Data/Entities/BaseItemMetadataField.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs diff --git a/Jellyfin.Data/Entities/BaseItemProvider.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs similarity index 100% rename from Jellyfin.Data/Entities/BaseItemProvider.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs diff --git a/Jellyfin.Data/Entities/BaseItemTrailerType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs similarity index 100% rename from Jellyfin.Data/Entities/BaseItemTrailerType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs diff --git a/Jellyfin.Data/Entities/Chapter.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs similarity index 100% rename from Jellyfin.Data/Entities/Chapter.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs diff --git a/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs similarity index 100% rename from Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs diff --git a/Jellyfin.Data/Entities/DisplayPreferences.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs similarity index 100% rename from Jellyfin.Data/Entities/DisplayPreferences.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs diff --git a/Jellyfin.Data/Entities/Group.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs similarity index 84% rename from Jellyfin.Data/Entities/Group.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs index 1be6f986a1..09f2372893 100644 --- a/Jellyfin.Data/Entities/Group.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs @@ -59,18 +59,6 @@ namespace Jellyfin.Data.Entities /// public virtual ICollection Preferences { get; private set; } - /// - public bool HasPermission(PermissionKind kind) - { - return Permissions.First(p => p.Kind == kind).Value; - } - - /// - public void SetPermission(PermissionKind kind, bool value) - { - Permissions.First(p => p.Kind == kind).Value = value; - } - /// public void OnSavingChanges() { diff --git a/Jellyfin.Data/Entities/HomeSection.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs similarity index 100% rename from Jellyfin.Data/Entities/HomeSection.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs diff --git a/Jellyfin.Data/Entities/ImageInfo.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs similarity index 100% rename from Jellyfin.Data/Entities/ImageInfo.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs diff --git a/Jellyfin.Data/Entities/ImageInfoImageType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs similarity index 100% rename from Jellyfin.Data/Entities/ImageInfoImageType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs diff --git a/Jellyfin.Data/Entities/ItemDisplayPreferences.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs similarity index 100% rename from Jellyfin.Data/Entities/ItemDisplayPreferences.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs diff --git a/Jellyfin.Data/Entities/ItemValue.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs similarity index 100% rename from Jellyfin.Data/Entities/ItemValue.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs diff --git a/Jellyfin.Data/Entities/ItemValueMap.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs similarity index 100% rename from Jellyfin.Data/Entities/ItemValueMap.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs diff --git a/Jellyfin.Data/Entities/ItemValueType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs similarity index 100% rename from Jellyfin.Data/Entities/ItemValueType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs diff --git a/Jellyfin.Data/Entities/Libraries/Artwork.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Artwork.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs diff --git a/Jellyfin.Data/Entities/Libraries/Book.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Book.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs diff --git a/Jellyfin.Data/Entities/Libraries/BookMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/BookMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Chapter.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Chapter.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs diff --git a/Jellyfin.Data/Entities/Libraries/Collection.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Collection.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs diff --git a/Jellyfin.Data/Entities/Libraries/CollectionItem.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/CollectionItem.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs diff --git a/Jellyfin.Data/Entities/Libraries/Company.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Company.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs diff --git a/Jellyfin.Data/Entities/Libraries/CompanyMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/CompanyMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/CustomItem.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/CustomItem.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs diff --git a/Jellyfin.Data/Entities/Libraries/CustomItemMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/CustomItemMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Episode.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Episode.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs diff --git a/Jellyfin.Data/Entities/Libraries/EpisodeMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/EpisodeMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Genre.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Genre.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs diff --git a/Jellyfin.Data/Entities/Libraries/ItemMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/ItemMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Library.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Library.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs diff --git a/Jellyfin.Data/Entities/Libraries/LibraryItem.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/LibraryItem.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs diff --git a/Jellyfin.Data/Entities/Libraries/MediaFile.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MediaFile.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs diff --git a/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MediaFileStream.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs diff --git a/Jellyfin.Data/Entities/Libraries/MetadataProvider.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MetadataProvider.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs diff --git a/Jellyfin.Data/Entities/Libraries/MetadataProviderId.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MetadataProviderId.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs diff --git a/Jellyfin.Data/Entities/Libraries/Movie.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Movie.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs diff --git a/Jellyfin.Data/Entities/Libraries/MovieMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MovieMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/MusicAlbum.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MusicAlbum.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs diff --git a/Jellyfin.Data/Entities/Libraries/MusicAlbumMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/MusicAlbumMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Person.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Person.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs diff --git a/Jellyfin.Data/Entities/Libraries/PersonRole.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/PersonRole.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs diff --git a/Jellyfin.Data/Entities/Libraries/Photo.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Photo.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs diff --git a/Jellyfin.Data/Entities/Libraries/PhotoMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/PhotoMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Rating.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Rating.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs diff --git a/Jellyfin.Data/Entities/Libraries/RatingSource.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/RatingSource.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs diff --git a/Jellyfin.Data/Entities/Libraries/Release.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Release.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs diff --git a/Jellyfin.Data/Entities/Libraries/Season.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Season.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs diff --git a/Jellyfin.Data/Entities/Libraries/SeasonMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/SeasonMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Series.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Series.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs diff --git a/Jellyfin.Data/Entities/Libraries/SeriesMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/SeriesMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs diff --git a/Jellyfin.Data/Entities/Libraries/Track.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/Track.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs diff --git a/Jellyfin.Data/Entities/Libraries/TrackMetadata.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs similarity index 100% rename from Jellyfin.Data/Entities/Libraries/TrackMetadata.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs diff --git a/Jellyfin.Data/Entities/MediaSegment.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs similarity index 100% rename from Jellyfin.Data/Entities/MediaSegment.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs diff --git a/Jellyfin.Data/Entities/MediaStreamInfo.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs similarity index 100% rename from Jellyfin.Data/Entities/MediaStreamInfo.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs diff --git a/Jellyfin.Data/Entities/MediaStreamTypeEntity.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs similarity index 100% rename from Jellyfin.Data/Entities/MediaStreamTypeEntity.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs diff --git a/Jellyfin.Data/Entities/People.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs similarity index 100% rename from Jellyfin.Data/Entities/People.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs diff --git a/Jellyfin.Data/Entities/PeopleBaseItemMap.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs similarity index 100% rename from Jellyfin.Data/Entities/PeopleBaseItemMap.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs diff --git a/Jellyfin.Data/Entities/Permission.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs similarity index 100% rename from Jellyfin.Data/Entities/Permission.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs diff --git a/Jellyfin.Data/Entities/Preference.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs similarity index 100% rename from Jellyfin.Data/Entities/Preference.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs diff --git a/Jellyfin.Data/Entities/ProgramAudioEntity.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs similarity index 100% rename from Jellyfin.Data/Entities/ProgramAudioEntity.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs diff --git a/Jellyfin.Data/Entities/Security/ApiKey.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs similarity index 100% rename from Jellyfin.Data/Entities/Security/ApiKey.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs diff --git a/Jellyfin.Data/Entities/Security/Device.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs similarity index 100% rename from Jellyfin.Data/Entities/Security/Device.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs diff --git a/Jellyfin.Data/Entities/Security/DeviceOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs similarity index 100% rename from Jellyfin.Data/Entities/Security/DeviceOptions.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs diff --git a/Jellyfin.Data/Entities/TrickplayInfo.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs similarity index 100% rename from Jellyfin.Data/Entities/TrickplayInfo.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs diff --git a/Jellyfin.Data/Entities/User.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs similarity index 56% rename from Jellyfin.Data/Entities/User.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs index 9bbe9efe89..f3398eeeac 100644 --- a/Jellyfin.Data/Entities/User.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs @@ -15,11 +15,6 @@ namespace Jellyfin.Data.Entities /// public class User : IHasPermissions, IHasConcurrencyToken { - /// - /// The values being delimited here are Guids, so commas work as they do not appear in Guids. - /// - private const char Delimiter = ','; - /// /// Initializes a new instance of the class. /// Public constructor with required data. @@ -339,196 +334,5 @@ namespace Jellyfin.Data.Entities { RowVersion++; } - - /// - /// Checks whether the user has the specified permission. - /// - /// The permission kind. - /// True if the user has the specified permission. - public bool HasPermission(PermissionKind kind) - { - return Permissions.FirstOrDefault(p => p.Kind == kind)?.Value ?? false; - } - - /// - /// Sets the given permission kind to the provided value. - /// - /// The permission kind. - /// The value to set. - public void SetPermission(PermissionKind kind, bool value) - { - var currentPermission = Permissions.FirstOrDefault(p => p.Kind == kind); - if (currentPermission is null) - { - Permissions.Add(new Permission(kind, value)); - } - else - { - currentPermission.Value = value; - } - } - - /// - /// Gets the user's preferences for the given preference kind. - /// - /// The preference kind. - /// A string array containing the user's preferences. - public string[] GetPreference(PreferenceKind preference) - { - var val = Preferences.FirstOrDefault(p => p.Kind == preference)?.Value; - - return string.IsNullOrEmpty(val) ? Array.Empty() : val.Split(Delimiter); - } - - /// - /// Gets the user's preferences for the given preference kind. - /// - /// The preference kind. - /// Type of preference. - /// A {T} array containing the user's preference. - public T[] GetPreferenceValues(PreferenceKind preference) - { - var val = Preferences.FirstOrDefault(p => p.Kind == preference)?.Value; - if (string.IsNullOrEmpty(val)) - { - return Array.Empty(); - } - - // Convert array of {string} to array of {T} - var converter = TypeDescriptor.GetConverter(typeof(T)); - var stringValues = val.Split(Delimiter); - var convertedCount = 0; - var parsedValues = new T[stringValues.Length]; - for (var i = 0; i < stringValues.Length; i++) - { - try - { - var parsedValue = converter.ConvertFromString(stringValues[i].Trim()); - if (parsedValue is not null) - { - parsedValues[convertedCount++] = (T)parsedValue; - } - } - catch (FormatException) - { - // Unable to convert value - } - } - - return parsedValues[..convertedCount]; - } - - /// - /// Sets the specified preference to the given value. - /// - /// The preference kind. - /// The values. - public void SetPreference(PreferenceKind preference, string[] values) - { - var value = string.Join(Delimiter, values); - var currentPreference = Preferences.FirstOrDefault(p => p.Kind == preference); - if (currentPreference is null) - { - Preferences.Add(new Preference(preference, value)); - } - else - { - currentPreference.Value = value; - } - } - - /// - /// Sets the specified preference to the given value. - /// - /// The preference kind. - /// The values. - /// The type of value. - public void SetPreference(PreferenceKind preference, T[] values) - { - var value = string.Join(Delimiter, values); - var currentPreference = Preferences.FirstOrDefault(p => p.Kind == preference); - if (currentPreference is null) - { - Preferences.Add(new Preference(preference, value)); - } - else - { - currentPreference.Value = value; - } - } - - /// - /// Checks whether this user is currently allowed to use the server. - /// - /// True if the current time is within an access schedule, or there are no access schedules. - public bool IsParentalScheduleAllowed() - { - return AccessSchedules.Count == 0 - || AccessSchedules.Any(i => IsParentalScheduleAllowed(i, DateTime.UtcNow)); - } - - /// - /// Checks whether the provided folder is in this user's grouped folders. - /// - /// The Guid of the folder. - /// True if the folder is in the user's grouped folders. - public bool IsFolderGrouped(Guid id) - { - return Array.IndexOf(GetPreferenceValues(PreferenceKind.GroupedFolders), id) != -1; - } - - /// - /// Initializes the default permissions for a user. Should only be called on user creation. - /// - // TODO: make these user configurable? - public void AddDefaultPermissions() - { - Permissions.Add(new Permission(PermissionKind.IsAdministrator, false)); - Permissions.Add(new Permission(PermissionKind.IsDisabled, false)); - Permissions.Add(new Permission(PermissionKind.IsHidden, true)); - Permissions.Add(new Permission(PermissionKind.EnableAllChannels, true)); - Permissions.Add(new Permission(PermissionKind.EnableAllDevices, true)); - Permissions.Add(new Permission(PermissionKind.EnableAllFolders, true)); - Permissions.Add(new Permission(PermissionKind.EnableContentDeletion, false)); - Permissions.Add(new Permission(PermissionKind.EnableContentDownloading, true)); - Permissions.Add(new Permission(PermissionKind.EnableMediaConversion, true)); - Permissions.Add(new Permission(PermissionKind.EnableMediaPlayback, true)); - Permissions.Add(new Permission(PermissionKind.EnablePlaybackRemuxing, true)); - Permissions.Add(new Permission(PermissionKind.EnablePublicSharing, true)); - Permissions.Add(new Permission(PermissionKind.EnableRemoteAccess, true)); - Permissions.Add(new Permission(PermissionKind.EnableSyncTranscoding, true)); - Permissions.Add(new Permission(PermissionKind.EnableAudioPlaybackTranscoding, true)); - Permissions.Add(new Permission(PermissionKind.EnableLiveTvAccess, true)); - Permissions.Add(new Permission(PermissionKind.EnableLiveTvManagement, true)); - Permissions.Add(new Permission(PermissionKind.EnableSharedDeviceControl, true)); - Permissions.Add(new Permission(PermissionKind.EnableVideoPlaybackTranscoding, true)); - Permissions.Add(new Permission(PermissionKind.ForceRemoteSourceTranscoding, false)); - Permissions.Add(new Permission(PermissionKind.EnableRemoteControlOfOtherUsers, false)); - Permissions.Add(new Permission(PermissionKind.EnableCollectionManagement, false)); - Permissions.Add(new Permission(PermissionKind.EnableSubtitleManagement, false)); - Permissions.Add(new Permission(PermissionKind.EnableLyricManagement, false)); - } - - /// - /// Initializes the default preferences. Should only be called on user creation. - /// - public void AddDefaultPreferences() - { - foreach (var val in Enum.GetValues()) - { - Preferences.Add(new Preference(val, string.Empty)); - } - } - - private static bool IsParentalScheduleAllowed(AccessSchedule schedule, DateTime date) - { - var localTime = date.ToLocalTime(); - var hour = localTime.TimeOfDay.TotalHours; - var currentDayOfWeek = localTime.DayOfWeek; - - return schedule.DayOfWeek.Contains(currentDayOfWeek) - && hour >= schedule.StartHour - && hour <= schedule.EndHour; - } } } diff --git a/Jellyfin.Data/Entities/UserData.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs similarity index 100% rename from Jellyfin.Data/Entities/UserData.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs diff --git a/Jellyfin.Data/Enums/ArtKind.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs similarity index 100% rename from Jellyfin.Data/Enums/ArtKind.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs diff --git a/Jellyfin.Data/Enums/ChromecastVersion.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs similarity index 100% rename from Jellyfin.Data/Enums/ChromecastVersion.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs diff --git a/Jellyfin.Data/Enums/DynamicDayOfWeek.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs similarity index 100% rename from Jellyfin.Data/Enums/DynamicDayOfWeek.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs diff --git a/Jellyfin.Data/Enums/HomeSectionType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs similarity index 100% rename from Jellyfin.Data/Enums/HomeSectionType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs diff --git a/Jellyfin.Data/Enums/IndexingKind.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs similarity index 100% rename from Jellyfin.Data/Enums/IndexingKind.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs diff --git a/Jellyfin.Data/Enums/MediaFileKind.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs similarity index 100% rename from Jellyfin.Data/Enums/MediaFileKind.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs diff --git a/Jellyfin.Data/Enums/MediaSegmentType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs similarity index 100% rename from Jellyfin.Data/Enums/MediaSegmentType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs diff --git a/Jellyfin.Data/Enums/PermissionKind.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs similarity index 100% rename from Jellyfin.Data/Enums/PermissionKind.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs diff --git a/Jellyfin.Data/Enums/PersonRoleType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs similarity index 100% rename from Jellyfin.Data/Enums/PersonRoleType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs diff --git a/Jellyfin.Data/Enums/PreferenceKind.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs similarity index 100% rename from Jellyfin.Data/Enums/PreferenceKind.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs diff --git a/Jellyfin.Data/Enums/ScrollDirection.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs similarity index 100% rename from Jellyfin.Data/Enums/ScrollDirection.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs diff --git a/Jellyfin.Data/Enums/SortOrder.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs similarity index 100% rename from Jellyfin.Data/Enums/SortOrder.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs diff --git a/Jellyfin.Data/Enums/SubtitlePlaybackMode.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs similarity index 100% rename from Jellyfin.Data/Enums/SubtitlePlaybackMode.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs diff --git a/Jellyfin.Data/Enums/SyncPlayUserAccessType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs similarity index 100% rename from Jellyfin.Data/Enums/SyncPlayUserAccessType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs diff --git a/Jellyfin.Data/Enums/ViewType.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs similarity index 100% rename from Jellyfin.Data/Enums/ViewType.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs new file mode 100644 index 0000000000..64dd03ca4e --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; + +namespace Jellyfin.Server.Implementations; + +/// +/// Defines the type and extension points for multi database support. +/// +public interface IJellyfinDatabaseProvider : IAsyncDisposable +{ + /// + /// Initialises jellyfins EFCore database access. + /// + /// The EFCore database options. + void Initialise(DbContextOptionsBuilder options); + + /// + /// Will be invoked when EFCore wants to build its model. + /// + /// The ModelBuilder from EFCore. + void OnModelCreating(ModelBuilder modelBuilder); + + /// + /// If supported this should run any periodic maintaince tasks. + /// + /// The token to abort the operation. + /// A representing the asynchronous operation. + Task RunScheduledOptimisation(CancellationToken cancellationToken); +} diff --git a/Jellyfin.Data/Interfaces/IHasArtwork.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs similarity index 100% rename from Jellyfin.Data/Interfaces/IHasArtwork.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs diff --git a/Jellyfin.Data/Interfaces/IHasCompanies.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs similarity index 100% rename from Jellyfin.Data/Interfaces/IHasCompanies.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs diff --git a/Jellyfin.Data/Interfaces/IHasConcurrencyToken.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs similarity index 100% rename from Jellyfin.Data/Interfaces/IHasConcurrencyToken.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs new file mode 100644 index 0000000000..6d1eb59f67 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using Jellyfin.Data.Entities; +using Jellyfin.Data.Enums; + +namespace Jellyfin.Data.Interfaces +{ + /// + /// An abstraction representing an entity that has permissions. + /// + public interface IHasPermissions + { + /// + /// Gets a collection containing this entity's permissions. + /// + ICollection Permissions { get; } + } +} diff --git a/Jellyfin.Data/Interfaces/IHasReleases.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs similarity index 100% rename from Jellyfin.Data/Interfaces/IHasReleases.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj b/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj new file mode 100644 index 0000000000..96cea69dfc --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj @@ -0,0 +1,43 @@ + + + + net9.0 + enable + enable + false + true + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs new file mode 100644 index 0000000000..b3ab3d0944 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs @@ -0,0 +1,29 @@ +namespace Jellyfin.Server.Implementations; + +/// +/// Defines the key of the database provider. +/// +[System.AttributeUsage(System.AttributeTargets.Class, Inherited = true, AllowMultiple = true)] +public sealed class JellyfinDatabaseProviderKeyAttribute : System.Attribute +{ + // See the attribute guidelines at + // http://go.microsoft.com/fwlink/?LinkId=85236 + private readonly string _databaseProviderKey; + + /// + /// Initializes a new instance of the class. + /// + /// The key on which to identify the annotated provider. + public JellyfinDatabaseProviderKeyAttribute(string databaseProviderKey) + { + this._databaseProviderKey = databaseProviderKey; + } + + /// + /// Gets the key on which to identify the annotated provider. + /// + public string DatabaseProviderKey + { + get { return _databaseProviderKey; } + } +} diff --git a/Jellyfin.Server.Implementations/JellyfinDbContext.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs similarity index 96% rename from Jellyfin.Server.Implementations/JellyfinDbContext.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs index becfd81a4a..f22609dd49 100644 --- a/Jellyfin.Server.Implementations/JellyfinDbContext.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs @@ -14,7 +14,8 @@ namespace Jellyfin.Server.Implementations; /// /// The database context options. /// Logger. -public class JellyfinDbContext(DbContextOptions options, ILogger logger) : DbContext(options) +/// The provider for the database engine specific operations. +public class JellyfinDbContext(DbContextOptions options, ILogger logger, IJellyfinDatabaseProvider jellyfinDatabaseProvider) : DbContext(options) { /// /// Gets the containing the access schedules. @@ -265,7 +266,7 @@ public class JellyfinDbContext(DbContextOptions options, ILog /// protected override void OnModelCreating(ModelBuilder modelBuilder) { - modelBuilder.SetDefaultDateTimeKind(DateTimeKind.Utc); + jellyfinDatabaseProvider.OnModelCreating(modelBuilder); base.OnModelCreating(modelBuilder); // Configuration for each entity is in it's own class inside 'ModelConfiguration'. diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ApiKeyConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/ApiKeyConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs similarity index 98% rename from Jellyfin.Server.Implementations/ModelConfiguration/BaseItemConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs index eaf48981cd..08f2a33566 100644 --- a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemConfiguration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs @@ -1,8 +1,6 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using SQLitePCL; namespace Jellyfin.Server.Implementations.ModelConfiguration; diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs similarity index 87% rename from Jellyfin.Server.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs index 137f4a883b..b4c6511bf2 100644 --- a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs @@ -1,10 +1,6 @@ -using System; -using System.Linq; using Jellyfin.Data.Entities; -using MediaBrowser.Model.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using SQLitePCL; namespace Jellyfin.Server.Implementations.ModelConfiguration; diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs similarity index 87% rename from Jellyfin.Server.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs index f03d99c29c..e9564b854b 100644 --- a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs @@ -1,10 +1,6 @@ -using System; -using System.Linq; using Jellyfin.Data.Entities; -using MediaBrowser.Model.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using SQLitePCL; namespace Jellyfin.Server.Implementations.ModelConfiguration; diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/DeviceConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/DeviceConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/PeopleConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/PeopleConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/PermissionConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/PermissionConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/PreferenceConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/PreferenceConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/UserConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/UserConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/UserDataConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelConfiguration/UserDataConfiguration.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj new file mode 100644 index 0000000000..ae1497403b --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj @@ -0,0 +1,51 @@ + + + + net9.0 + enable + enable + false + true + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj new file mode 100644 index 0000000000..0f04275392 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj @@ -0,0 +1,51 @@ + + + + net9.0 + enable + enable + false + true + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200514181226_AddActivityLog.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200613202153_AddUsers.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200728005145_AddDisplayPreferences.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20200905220533_FixDisplayPreferencesIndex.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20201004171403_AddMaxActiveSessions.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20201204223655_AddCustomDisplayPreferences.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20210320181425_AddIndexesAndCollations.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20210407110544_NullableCustomPrefValue.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20230526173516_RemoveEasyPassword.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20230526173516_RemoveEasyPassword.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20230526173516_RemoveEasyPassword.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20230526173516_RemoveEasyPassword.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20230626233818_AddTrickplayInfos.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20230626233818_AddTrickplayInfos.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20230626233818_AddTrickplayInfos.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20230626233818_AddTrickplayInfos.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20230923170422_UserCastReceiver.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20230923170422_UserCastReceiver.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20230923170422_UserCastReceiver.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20230923170422_UserCastReceiver.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20240729140605_AddMediaSegments.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20240729140605_AddMediaSegments.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20240729140605_AddMediaSegments.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20240729140605_AddMediaSegments.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241020103111_LibraryDbMigration.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241020103111_LibraryDbMigration.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241020103111_LibraryDbMigration.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241020103111_LibraryDbMigration.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241111131257_AddedCustomDataKey.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241111131257_AddedCustomDataKey.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241111131257_AddedCustomDataKey.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241111131257_AddedCustomDataKey.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241112152323_FixAncestorIdConfig.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241112152323_FixAncestorIdConfig.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241112232041_fixMediaStreams.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241112232041_fixMediaStreams.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241112232041_fixMediaStreams.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241112232041_fixMediaStreams.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241112234144_FixMediaStreams2.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241112234144_FixMediaStreams2.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241112234144_FixMediaStreams2.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241112234144_FixMediaStreams2.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs diff --git a/Jellyfin.Server.Implementations/Migrations/20241113133548_EnforceUniqueItemValue.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/20241113133548_EnforceUniqueItemValue.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs diff --git a/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs similarity index 61% rename from Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs index 500c4a1c72..942af284a9 100644 --- a/Jellyfin.Server.Implementations/Migrations/DesignTimeJellyfinDbFactory.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs @@ -1,3 +1,4 @@ +using Jellyfin.Database.Providers.SqLite; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Logging.Abstractions; @@ -8,14 +9,17 @@ namespace Jellyfin.Server.Implementations.Migrations /// The design time factory for . /// This is only used for the creation of migrations and not during runtime. /// - internal class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory + internal sealed class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory { public JellyfinDbContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseSqlite("Data Source=jellyfin.db"); - return new JellyfinDbContext(optionsBuilder.Options, NullLogger.Instance); + return new JellyfinDbContext( + optionsBuilder.Options, + NullLogger.Instance, + new SqliteDatabaseProvider(null!, null!, NullLogger.Instance)); } } } diff --git a/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs similarity index 100% rename from Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs new file mode 100644 index 0000000000..8bc025a0bf --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs @@ -0,0 +1,78 @@ +using System; +using Jellyfin.Server.Implementations; +using MediaBrowser.Common.Configuration; +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; + +namespace Jellyfin.Database.Providers.SqLite; + +/// +/// Configures jellyfin to use an SqLite database. +/// +public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider +{ + private readonly IApplicationPaths _applicationPaths; + private readonly ILogger _logger; + + /// + /// Initializes a new instance of the class. + /// + /// The Db context to interact with the database. + /// Service to construct the fallback when the old data path configuration is used. + /// A logger. + public SqliteDatabaseProvider(IDbContextFactory dbContextFactory, IApplicationPaths applicationPaths, ILogger logger) + { + DbContextFactory = dbContextFactory; + _applicationPaths = applicationPaths; + _logger = logger; + } + + private IDbContextFactory DbContextFactory { get; } + + /// + public void Initialise(DbContextOptionsBuilder options) + { + options.UseSqlite( + $"Filename={Path.Combine(_applicationPaths.DataPath, "jellyfin.db")};Pooling=false", + sqLiteOptions => sqLiteOptions.MigrationsAssembly(GetType().Assembly)); + } + + /// + public async Task RunScheduledOptimisation(CancellationToken cancellationToken) + { + var context = await DbContextFactory.CreateDbContextAsync(cancellationToken).ConfigureAwait(false); + await using (context.ConfigureAwait(false)) + { + if (context.Database.IsSqlite()) + { + await context.Database.ExecuteSqlRawAsync("PRAGMA optimize", cancellationToken).ConfigureAwait(false); + await context.Database.ExecuteSqlRawAsync("VACUUM", cancellationToken).ConfigureAwait(false); + _logger.LogInformation("jellyfin.db optimized successfully!"); + } + else + { + _logger.LogInformation("This database doesn't support optimization"); + } + } + } + + /// + public void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.SetDefaultDateTimeKind(DateTimeKind.Utc); + } + + /// + public async ValueTask DisposeAsync() + { + // Run before disposing the application + var context = await DbContextFactory.CreateDbContextAsync().ConfigureAwait(false); + await using (context.ConfigureAwait(false)) + { + await context.Database.ExecuteSqlRawAsync("PRAGMA optimize").ConfigureAwait(false); + } + + SqliteConnection.ClearAllPools(); + } +} diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationFactory.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationFactory.cs new file mode 100644 index 0000000000..26d32f4173 --- /dev/null +++ b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationFactory.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using MediaBrowser.Common.Configuration; + +namespace Jellyfin.Server.Implementations.DatabaseConfiguration; + +/// +/// Factory for constructing a database configuration. +/// +public class DatabaseConfigurationFactory : IConfigurationFactory +{ + /// + public IEnumerable GetConfigurations() + { + yield return new DatabaseConfigurationStore(); + } +} diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs new file mode 100644 index 0000000000..af2ede7010 --- /dev/null +++ b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs @@ -0,0 +1,14 @@ +using System; + +namespace Jellyfin.Server.Implementations.DatabaseConfiguration; + +/// +/// Options to configure jellyfins managed database. +/// +public class DatabaseConfigurationOptions +{ + /// + /// Gets or Sets the type of database jellyfin should use. + /// + public required string DatabaseType { get; set; } +} diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs new file mode 100644 index 0000000000..180561fc84 --- /dev/null +++ b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using MediaBrowser.Common.Configuration; + +namespace Jellyfin.Server.Implementations.DatabaseConfiguration; + +/// +/// A configuration that stores database related settings. +/// +public class DatabaseConfigurationStore : ConfigurationStore +{ + /// + /// The name of the configuration in the storage. + /// + public const string StoreKey = "database"; + + /// + /// Initializes a new instance of the class. + /// + public DatabaseConfigurationStore() + { + ConfigurationType = typeof(DatabaseConfigurationOptions); + Key = StoreKey; + } +} diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index d3bff2936c..1b4048b8e6 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Dtos; using Jellyfin.Data.Entities; using Jellyfin.Data.Entities.Security; diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 7eee260593..e48f4ce106 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -1,8 +1,14 @@ using System; +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Reflection; +using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller.Configuration; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; +using JellyfinDbProviderFactory = System.Func; namespace Jellyfin.Server.Implementations.Extensions; @@ -11,17 +17,59 @@ namespace Jellyfin.Server.Implementations.Extensions; /// public static class ServiceCollectionExtensions { + private static IDictionary GetSupportedDbProviders() + { + var items = new Dictionary(); + foreach (var providerType in AppDomain + .CurrentDomain + .GetAssemblies() + .SelectMany(f => f.GetTypes()) + .Where(e => e.IsClass && typeof(IJellyfinDatabaseProvider).IsAssignableFrom(e))) + { + var keyAttribute = providerType.GetCustomAttribute(); + if (keyAttribute is null || string.IsNullOrWhiteSpace(keyAttribute.DatabaseProviderKey)) + { + continue; + } + + var provider = providerType; + items[keyAttribute.DatabaseProviderKey] = (services) => (IJellyfinDatabaseProvider)ActivatorUtilities.CreateInstance(services, providerType); + } + + return items; + } + /// /// Adds the interface to the service collection with second level caching enabled. /// /// An instance of the interface. + /// The server configuration manager. /// The updated service collection. - public static IServiceCollection AddJellyfinDbContext(this IServiceCollection serviceCollection) + public static IServiceCollection AddJellyfinDbContext(this IServiceCollection serviceCollection, IServerConfigurationManager configurationManager) { + var efCoreConfiguration = configurationManager.GetConfiguration("database"); + var providers = GetSupportedDbProviders(); + JellyfinDbProviderFactory? providerFactory = null; + + if (efCoreConfiguration is null) + { + // when nothing is setup via new Database configuration, fallback to SqLite with default settings. + efCoreConfiguration = new DatabaseConfigurationOptions() + { + DatabaseType = "SqLite", + }; + } + else if (!providers.TryGetValue(efCoreConfiguration.DatabaseType, out providerFactory!)) + { + throw new InvalidOperationException($"Jellyfin cannot find the database provider of type '{efCoreConfiguration.DatabaseType}'. Supported types are {string.Join(", ", providers.Keys)}"); + } + + serviceCollection.AddSingleton(providerFactory!); + serviceCollection.AddPooledDbContextFactory((serviceProvider, opt) => { - var applicationPaths = serviceProvider.GetRequiredService(); - opt.UseSqlite($"Filename={Path.Combine(applicationPaths.DataPath, "jellyfin.db")};Pooling=false"); + var provider = serviceProvider.GetRequiredService(); + provider.Initialise(opt); }); return serviceCollection; diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index 31cf24fb2d..cf3c792764 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -28,22 +28,14 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs b/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs index 45b0a0853e..27222a183c 100644 --- a/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs +++ b/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs @@ -1,5 +1,6 @@ using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index c7ae0f4dbe..44de11b661 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index ebb12ba4e7..bd094d6914 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -66,6 +66,7 @@ + diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs index d0360a56d7..13ea61d65b 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Text; +using System.Threading; using Emby.Server.Implementations.Data; using Jellyfin.Data.Entities; using Jellyfin.Extensions; @@ -33,6 +34,7 @@ public class MigrateLibraryDb : IMigrationRoutine private readonly ILogger _logger; private readonly IServerApplicationPaths _paths; + private readonly IJellyfinDatabaseProvider _jellyfinDatabaseProvider; private readonly IDbContextFactory _provider; /// @@ -41,14 +43,17 @@ public class MigrateLibraryDb : IMigrationRoutine /// The logger. /// The database provider. /// The server application paths. + /// The database provider for special access. public MigrateLibraryDb( ILogger logger, IDbContextFactory provider, - IServerApplicationPaths paths) + IServerApplicationPaths paths, + IJellyfinDatabaseProvider jellyfinDatabaseProvider) { _logger = logger; _provider = provider; _paths = paths; + _jellyfinDatabaseProvider = jellyfinDatabaseProvider; } /// @@ -319,17 +324,7 @@ public class MigrateLibraryDb : IMigrationRoutine _logger.LogInformation("Migrating Library db took {0}.", migrationTotalTime); - if (dbContext.Database.IsSqlite()) - { - _logger.LogInformation("Vaccum and Optimise jellyfin.db now."); - dbContext.Database.ExecuteSqlRaw("PRAGMA optimize"); - dbContext.Database.ExecuteSqlRaw("VACUUM"); - _logger.LogInformation("jellyfin.db optimized successfully!"); - } - else - { - _logger.LogInformation("This database doesn't support optimization"); - } + _jellyfinDatabaseProvider.RunScheduledOptimisation(CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult(); } private UserData? GetUserData(ImmutableArray users, SqliteDataReader dto) diff --git a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs index 7dcae5bd9d..f126230fb4 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs @@ -1,6 +1,7 @@ using System; using System.IO; using Emby.Server.Implementations.Data; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions.Json; diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 3f73c15b4a..a6270aa93d 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -194,23 +194,11 @@ namespace Jellyfin.Server // Don't throw additional exception if startup failed. if (appHost.ServiceProvider is not null) { - var isSqlite = false; _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>().CreateDbContextAsync().ConfigureAwait(false); - await using (context.ConfigureAwait(false)) - { - if (context.Database.IsSqlite()) - { - isSqlite = true; - await context.Database.ExecuteSqlRawAsync("PRAGMA optimize").ConfigureAwait(false); - } - } - if (isSqlite) - { - SqliteConnection.ClearAllPools(); - } + var databaseProvider = appHost.ServiceProvider.GetRequiredService(); + + await databaseProvider.DisposeAsync().ConfigureAwait(false); } host?.Dispose(); diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs index c686614699..850b653e1c 100644 --- a/Jellyfin.Server/Startup.cs +++ b/Jellyfin.Server/Startup.cs @@ -67,7 +67,7 @@ namespace Jellyfin.Server // TODO remove once this is fixed upstream https://github.com/dotnet/aspnetcore/issues/34371 services.AddSingleton, SymlinkFollowingPhysicalFileResultExecutor>(); services.AddJellyfinApi(_serverApplicationHost.GetApiPluginAssemblies(), _serverConfigurationManager.GetNetworkConfiguration()); - services.AddJellyfinDbContext(); + services.AddJellyfinDbContext(_serverApplicationHost.ConfigurationManager); services.AddJellyfinApiSwagger(); // configure custom legacy authentication diff --git a/Jellyfin.sln b/Jellyfin.sln index edef9b7a59..e6642c296d 100644 --- a/Jellyfin.sln +++ b/Jellyfin.sln @@ -87,6 +87,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv.Tests", "te EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv", "src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj", "{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.SqLite", "Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.PgSql", "Jellyfin.Database\Jellyfin.Database.Providers.PgSql\Jellyfin.Database.Providers.PgSql.csproj", "{EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Implementations", "Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj", "{8C9F9221-8415-496C-B1F5-E7756F03FA59}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -241,17 +249,32 @@ Global {8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU {8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU {8C6B2B13-58A4-4506-9DAB-1F882A093FE0}.Release|Any CPU.Build.0 = Release|Any CPU + {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Release|Any CPU.Build.0 = Release|Any CPU + {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Release|Any CPU.Build.0 = Release|Any CPU + {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {08FFF49B-F175-4807-A2B5-73B0EBD9F716} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} + {154872D9-6C12-4007-96E3-8F70A58386CE} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {DF194677-DFD3-42AF-9F75-D44D5A416478} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {28464062-0939-4AA7-9F7B-24DDDA61A7C0} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {3998657B-1CCC-49DD-A19F-275DC8495F57} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {A2FD0A10-8F62-4F9D-B171-FFDF9F0AFA9D} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {2E3A1B4B-4225-4AAA-8B29-0181A84E7AEE} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {462584F7-5023-4019-9EAC-B98CA458C0A0} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} + {0A3FCC4D-C714-4072-B90F-E374A15F9FF9} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {30922383-D513-4F4D-B890-A940B57FA353} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {FC1BC0CE-E8D2-4AE9-A6AB-8A02143B335D} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {42816EA8-4511-4CBF-A9C7-7791D5DDDAE6} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} @@ -264,11 +287,11 @@ Global {DA9FD356-4894-4830-B208-D6BCE3E65B11} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {FE47334C-EFDE-4519-BD50-F24430FF360B} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {24960660-DE6C-47BF-AEEF-CEE8F19FE6C2} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} - {08FFF49B-F175-4807-A2B5-73B0EBD9F716} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} - {154872D9-6C12-4007-96E3-8F70A58386CE} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} - {0A3FCC4D-C714-4072-B90F-E374A15F9FF9} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {8C6B2B13-58A4-4506-9DAB-1F882A093FE0} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} + {A5590358-33CC-4B39-BDE7-DC62FEB03C76} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} + {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} + {8C9F9221-8415-496C-B1F5-E7756F03FA59} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3448830C-EBDC-426C-85CD-7BBB9651A7FE} diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs index f186523b9a..b289a3dd1c 100644 --- a/MediaBrowser.Controller/Channels/Channel.cs +++ b/MediaBrowser.Controller/Channels/Channel.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Linq; using System.Text.Json.Serialization; using System.Threading; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index f3873775b9..3b0938ea79 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Dto; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 5375509256..b857d9537e 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index a6bc35a9f4..6b19cdea35 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -12,6 +12,7 @@ using System.Text; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index a13f046142..9605782aef 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -13,6 +13,7 @@ using System.Threading; using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using J2N.Collections.Generic.Extensions; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index 43f02fb72b..0bd28154de 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Dto; diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index d0c9f049ab..a73cc917ee 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Text.Json.Serialization; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 137d91f1cf..f3c252decc 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -9,12 +9,12 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Providers; using MediaBrowser.Model.Querying; using MetadataProvider = MediaBrowser.Model.Entities.MetadataProvider; diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index 4ec2e4c0a4..3670808673 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Extensions; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 9399679a4f..cd31726682 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -13,6 +13,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Text.RegularExpressions; using System.Threading; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Configuration; diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index bf6871a745..a3b5aa9a6e 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Dto; diff --git a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs index 57557d55ca..d35ed57b89 100644 --- a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs +++ b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs @@ -10,6 +10,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Extensions; using MediaBrowser.Common; diff --git a/src/Jellyfin.LiveTv/LiveTvManager.cs b/src/Jellyfin.LiveTv/LiveTvManager.cs index 0c85dc434b..da98606a4b 100644 --- a/src/Jellyfin.LiveTv/LiveTvManager.cs +++ b/src/Jellyfin.LiveTv/LiveTvManager.cs @@ -8,6 +8,7 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; diff --git a/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs b/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs index e63afa6260..1d571805b8 100644 --- a/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs +++ b/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs @@ -2,6 +2,7 @@ using System; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Data; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using MediaBrowser.Controller.Library; diff --git a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs index 6f5c0ed0c8..99f10583c1 100644 --- a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs @@ -6,6 +6,7 @@ using AutoFixture; using AutoFixture.AutoMoq; using Jellyfin.Api.Auth; using Jellyfin.Api.Constants; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Authentication; diff --git a/tests/Jellyfin.Api.Tests/TestHelpers.cs b/tests/Jellyfin.Api.Tests/TestHelpers.cs index 12cf025bc5..d84da89e28 100644 --- a/tests/Jellyfin.Api.Tests/TestHelpers.cs +++ b/tests/Jellyfin.Api.Tests/TestHelpers.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Net; using System.Security.Claims; using Jellyfin.Api.Constants; +using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Server.Implementations.Users; diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs index e6ccae1830..54d5d2adf8 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs @@ -1,6 +1,5 @@ using System; using System.Threading.Tasks; -using Jellyfin.Server.Implementations.Migrations; using Microsoft.EntityFrameworkCore; using Xunit; @@ -8,11 +7,11 @@ namespace Jellyfin.Server.Implementations.Tests.EfMigrations; public class EfMigrationTests { - [Fact] - public void CheckForUnappliedMigrations() - { - var dbDesignContext = new DesignTimeJellyfinDbFactory(); - var context = dbDesignContext.CreateDbContext([]); - Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration."); - } + // [Fact] + // public void CheckForUnappliedMigrations() + // { + // var dbDesignContext = new DesignTimeJellyfinDbFactory(); + // var context = dbDesignContext.CreateDbContext([]); + // Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration."); + // } } From 9d1c4ea169a15d580923aefb0ec43c2b6be5b3a6 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 16:35:46 +0000 Subject: [PATCH 02/34] Fixed DbContext usage on Provider --- .../ApplicationHost.cs | 6 +++++- .../IJellyfinDatabaseProvider.cs | 5 +++++ .../Jellyfin.Database.Providers.SqLite.csproj | 2 +- .../Migrations/DesignTimeJellyfinDbFactory.cs | 2 +- .../ModelBuilderExtensions.cs | 0 .../SqliteDatabaseProvider.cs | 12 ++++++------ .../DateTimeKindValueConverter.cs | 0 .../Extensions/ServiceCollectionExtensions.cs | 19 +++++++++++-------- .../Jellyfin.Server.Implementations.csproj | 1 + Jellyfin.Server/CoreAppHost.cs | 6 +++++- 10 files changed, 35 insertions(+), 18 deletions(-) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/ModelBuilderExtensions.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Providers.SqLite}/ValueConverters/DateTimeKindValueConverter.cs (100%) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 29967c6df5..6687be2e91 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -575,7 +575,11 @@ namespace Emby.Server.Implementations /// A task representing the service initialization operation. public async Task InitializeServices() { - var jellyfinDb = await Resolve>().CreateDbContextAsync().ConfigureAwait(false); + var factory = Resolve>(); + var provider = Resolve(); + provider.DbContextFactory = factory; + + var jellyfinDb = await factory.CreateDbContextAsync().ConfigureAwait(false); await using (jellyfinDb.ConfigureAwait(false)) { if ((await jellyfinDb.Database.GetPendingMigrationsAsync().ConfigureAwait(false)).Any()) diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs index 64dd03ca4e..72a6f819e0 100644 --- a/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -10,6 +10,11 @@ namespace Jellyfin.Server.Implementations; /// public interface IJellyfinDatabaseProvider : IAsyncDisposable { + /// + /// Gets or Sets the Database Factory when initialisaition is done. + /// + IDbContextFactory? DbContextFactory { get; set; } + /// /// Initialises jellyfins EFCore database access. /// diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj index 0f04275392..e77c944f95 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj @@ -45,7 +45,7 @@ - + diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs index 942af284a9..ff0ce3403c 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs @@ -19,7 +19,7 @@ namespace Jellyfin.Server.Implementations.Migrations return new JellyfinDbContext( optionsBuilder.Options, NullLogger.Instance, - new SqliteDatabaseProvider(null!, null!, NullLogger.Instance)); + new SqliteDatabaseProvider(null!, NullLogger.Instance)); } } } diff --git a/Jellyfin.Server.Implementations/ModelBuilderExtensions.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs similarity index 100% rename from Jellyfin.Server.Implementations/ModelBuilderExtensions.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs index 8bc025a0bf..8ef5b6af5e 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs @@ -10,6 +10,7 @@ namespace Jellyfin.Database.Providers.SqLite; /// /// Configures jellyfin to use an SqLite database. /// +[JellyfinDatabaseProviderKey("Jellyfin-SqLite")] public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider { private readonly IApplicationPaths _applicationPaths; @@ -18,17 +19,16 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider /// /// Initializes a new instance of the class. /// - /// The Db context to interact with the database. /// Service to construct the fallback when the old data path configuration is used. /// A logger. - public SqliteDatabaseProvider(IDbContextFactory dbContextFactory, IApplicationPaths applicationPaths, ILogger logger) + public SqliteDatabaseProvider(IApplicationPaths applicationPaths, ILogger logger) { - DbContextFactory = dbContextFactory; _applicationPaths = applicationPaths; _logger = logger; } - private IDbContextFactory DbContextFactory { get; } + /// + public IDbContextFactory? DbContextFactory { get; set; } /// public void Initialise(DbContextOptionsBuilder options) @@ -41,7 +41,7 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider /// public async Task RunScheduledOptimisation(CancellationToken cancellationToken) { - var context = await DbContextFactory.CreateDbContextAsync(cancellationToken).ConfigureAwait(false); + var context = await DbContextFactory!.CreateDbContextAsync(cancellationToken).ConfigureAwait(false); await using (context.ConfigureAwait(false)) { if (context.Database.IsSqlite()) @@ -67,7 +67,7 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider public async ValueTask DisposeAsync() { // Run before disposing the application - var context = await DbContextFactory.CreateDbContextAsync().ConfigureAwait(false); + var context = await DbContextFactory!.CreateDbContextAsync().ConfigureAwait(false); await using (context.ConfigureAwait(false)) { await context.Database.ExecuteSqlRawAsync("PRAGMA optimize").ConfigureAwait(false); diff --git a/Jellyfin.Server.Implementations/ValueConverters/DateTimeKindValueConverter.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs similarity index 100% rename from Jellyfin.Server.Implementations/ValueConverters/DateTimeKindValueConverter.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index e48f4ce106..1b0dbbe108 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using Jellyfin.Database.Providers.SqLite; using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Configuration; @@ -17,14 +18,15 @@ namespace Jellyfin.Server.Implementations.Extensions; /// public static class ServiceCollectionExtensions { + private static IEnumerable DatabaseProviderTypes() + { + yield return typeof(SqliteDatabaseProvider); + } + private static IDictionary GetSupportedDbProviders() { var items = new Dictionary(); - foreach (var providerType in AppDomain - .CurrentDomain - .GetAssemblies() - .SelectMany(f => f.GetTypes()) - .Where(e => e.IsClass && typeof(IJellyfinDatabaseProvider).IsAssignableFrom(e))) + foreach (var providerType in DatabaseProviderTypes()) { var keyAttribute = providerType.GetCustomAttribute(); if (keyAttribute is null || string.IsNullOrWhiteSpace(keyAttribute.DatabaseProviderKey)) @@ -51,15 +53,16 @@ public static class ServiceCollectionExtensions var providers = GetSupportedDbProviders(); JellyfinDbProviderFactory? providerFactory = null; - if (efCoreConfiguration is null) + if (efCoreConfiguration?.DatabaseType is null) { // when nothing is setup via new Database configuration, fallback to SqLite with default settings. efCoreConfiguration = new DatabaseConfigurationOptions() { - DatabaseType = "SqLite", + DatabaseType = "Jellyfin-SqLite", }; } - else if (!providers.TryGetValue(efCoreConfiguration.DatabaseType, out providerFactory!)) + + if (!providers.TryGetValue(efCoreConfiguration.DatabaseType, out providerFactory!)) { throw new InvalidOperationException($"Jellyfin cannot find the database provider of type '{efCoreConfiguration.DatabaseType}'. Supported types are {string.Join(", ", providers.Keys)}"); } diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index cf3c792764..b566b3489b 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -36,6 +36,7 @@ + diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs index d5b6e93b8e..9788119a54 100644 --- a/Jellyfin.Server/CoreAppHost.cs +++ b/Jellyfin.Server/CoreAppHost.cs @@ -11,6 +11,7 @@ using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.Activity; using Jellyfin.Server.Implementations.Devices; using Jellyfin.Server.Implementations.Events; +using Jellyfin.Server.Implementations.Extensions; using Jellyfin.Server.Implementations.Security; using Jellyfin.Server.Implementations.Trickplay; using Jellyfin.Server.Implementations.Users; @@ -116,9 +117,12 @@ namespace Jellyfin.Server // Jellyfin.Server yield return typeof(CoreAppHost).Assembly; - // Jellyfin.Server.Implementations + // Jellyfin.Database.Implementations yield return typeof(JellyfinDbContext).Assembly; + // Jellyfin.Server.Implementations + yield return typeof(ServiceCollectionExtensions).Assembly; + // Jellyfin.LiveTv yield return typeof(LiveTvManager).Assembly; } From 844646e2fe6d726edc8e086cc465396303d24f29 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 17:20:14 +0000 Subject: [PATCH 03/34] Fixed migration runner and added docs for adding migrations --- .../ApplicationHost.cs | 3 ++- .../Migrations/DesignTimeJellyfinDbFactory.cs | 2 +- Jellyfin.Database/readme.md | 26 +++++++++++++++++++ .../Extensions/ServiceCollectionExtensions.cs | 26 +++++++++++++++---- .../Extensions/WebHostBuilderExtensions.cs | 2 +- Jellyfin.Server/Program.cs | 2 +- Jellyfin.Server/Startup.cs | 7 +++-- .../JellyfinApplicationFactory.cs | 3 ++- 8 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 Jellyfin.Database/readme.md diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 6687be2e91..eb01ed0fe5 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -572,8 +572,9 @@ namespace Emby.Server.Implementations /// /// Create services registered with the service container that need to be initialized at application startup. /// + /// The configuration used to initialise the application. /// A task representing the service initialization operation. - public async Task InitializeServices() + public async Task InitializeServices(IConfiguration startupConfig) { var factory = Resolve>(); var provider = Resolve(); diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs index ff0ce3403c..fdd9a51361 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs @@ -14,7 +14,7 @@ namespace Jellyfin.Server.Implementations.Migrations public JellyfinDbContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); - optionsBuilder.UseSqlite("Data Source=jellyfin.db"); + optionsBuilder.UseSqlite("Data Source=jellyfin.db", f => f.MigrationsAssembly(GetType().Assembly)); return new JellyfinDbContext( optionsBuilder.Options, diff --git a/Jellyfin.Database/readme.md b/Jellyfin.Database/readme.md new file mode 100644 index 0000000000..883aff2d75 --- /dev/null +++ b/Jellyfin.Database/readme.md @@ -0,0 +1,26 @@ +# How to run EFCore migrations + +This shall provide context on how to work with entity frameworks multi provider migration feature. + +Jellyfin supports multiple database providers, namely SqLite as its default and the experimental postgresSQL. + +Each provider has its own set of migrations, as they contain provider specific instructions to migrate the specific changes to their respective systems. + +When creating a new migration, you always have to create migrations for all providers. This is supported via the following syntax: + +```cmd +dotnet ef migrations add MIGRATION_NAME --project "PATH_TO_PROJECT" -- --provider PROVIDER_KEY +``` + +with both sqlite and pgsql currently beeing supported and both need migrations, you need to run the efcore tool with the correct project to tell EfCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. + +The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin` + +```cmd +dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SqLite +dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.PgSql" -- --migration-provider Jellyfin-PgSql +``` + +If you get the error: `Run "dotnet tool restore" to make the "dotnet-ef" command available.` Run `dotnet restore`. + +in the event that you get the error: `System.UnauthorizedAccessException: Access to the path '/Jellyfin.Database' is denied.` you have to restore as sudo and then run `ef migrations` as sudo too. diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 1b0dbbe108..091ecee987 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -8,6 +8,7 @@ using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Configuration; using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using JellyfinDbProviderFactory = System.Func; @@ -46,8 +47,12 @@ public static class ServiceCollectionExtensions /// /// An instance of the interface. /// The server configuration manager. + /// The startup Configuration. /// The updated service collection. - public static IServiceCollection AddJellyfinDbContext(this IServiceCollection serviceCollection, IServerConfigurationManager configurationManager) + public static IServiceCollection AddJellyfinDbContext( + this IServiceCollection serviceCollection, + IServerConfigurationManager configurationManager, + IConfiguration configuration) { var efCoreConfiguration = configurationManager.GetConfiguration("database"); var providers = GetSupportedDbProviders(); @@ -55,11 +60,22 @@ public static class ServiceCollectionExtensions if (efCoreConfiguration?.DatabaseType is null) { - // when nothing is setup via new Database configuration, fallback to SqLite with default settings. - efCoreConfiguration = new DatabaseConfigurationOptions() + var cmdMigrationArgument = configuration.GetValue("migration-provider"); + if (!string.IsNullOrWhiteSpace(cmdMigrationArgument)) { - DatabaseType = "Jellyfin-SqLite", - }; + efCoreConfiguration = new DatabaseConfigurationOptions() + { + DatabaseType = cmdMigrationArgument, + }; + } + else + { + // when nothing is setup via new Database configuration, fallback to SqLite with default settings. + efCoreConfiguration = new DatabaseConfigurationOptions() + { + DatabaseType = "Jellyfin-SqLite", + }; + } } if (!providers.TryGetValue(efCoreConfiguration.DatabaseType, out providerFactory!)) diff --git a/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs b/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs index 6b95770ed5..7695c0d9ee 100644 --- a/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs +++ b/Jellyfin.Server/Extensions/WebHostBuilderExtensions.cs @@ -85,6 +85,6 @@ public static class WebHostBuilderExtensions logger.LogInformation("Kestrel listening to unix socket {SocketPath}", socketPath); } }) - .UseStartup(_ => new Startup(appHost)); + .UseStartup(context => new Startup(appHost, context.Configuration)); } } diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index a6270aa93d..fd23b7e25c 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -157,7 +157,7 @@ namespace Jellyfin.Server // Re-use the host service provider in the app host since ASP.NET doesn't allow a custom service collection. appHost.ServiceProvider = host.Services; - await appHost.InitializeServices().ConfigureAwait(false); + await appHost.InitializeServices(startupConfig).ConfigureAwait(false); Migrations.MigrationRunner.Run(appHost, _loggerFactory); try diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs index 850b653e1c..fa21d25664 100644 --- a/Jellyfin.Server/Startup.cs +++ b/Jellyfin.Server/Startup.cs @@ -39,15 +39,18 @@ namespace Jellyfin.Server public class Startup { private readonly CoreAppHost _serverApplicationHost; + private readonly IConfiguration _configuration; private readonly IServerConfigurationManager _serverConfigurationManager; /// /// Initializes a new instance of the class. /// /// The server application host. - public Startup(CoreAppHost appHost) + /// The used Configuration. + public Startup(CoreAppHost appHost, IConfiguration configuration) { _serverApplicationHost = appHost; + _configuration = configuration; _serverConfigurationManager = appHost.ConfigurationManager; } @@ -67,7 +70,7 @@ namespace Jellyfin.Server // TODO remove once this is fixed upstream https://github.com/dotnet/aspnetcore/issues/34371 services.AddSingleton, SymlinkFollowingPhysicalFileResultExecutor>(); services.AddJellyfinApi(_serverApplicationHost.GetApiPluginAssemblies(), _serverConfigurationManager.GetNetworkConfiguration()); - services.AddJellyfinDbContext(_serverApplicationHost.ConfigurationManager); + services.AddJellyfinDbContext(_serverApplicationHost.ConfigurationManager, _configuration); services.AddJellyfinApiSwagger(); // configure custom legacy authentication diff --git a/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs b/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs index 78b32d2785..a7fec2960c 100644 --- a/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs +++ b/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs @@ -13,6 +13,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Moq; using Serilog; using Serilog.Extensions.Logging; @@ -102,7 +103,7 @@ namespace Jellyfin.Server.Integration.Tests var host = builder.Build(); var appHost = (TestAppHost)host.Services.GetRequiredService(); appHost.ServiceProvider = host.Services; - appHost.InitializeServices().GetAwaiter().GetResult(); + appHost.InitializeServices(Mock.Of()).GetAwaiter().GetResult(); host.Start(); appHost.RunStartupTasksAsync().GetAwaiter().GetResult(); From 433640d98534667602bfaac08ce7cdb600a8377b Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 17:43:34 +0000 Subject: [PATCH 04/34] =?UTF-8?q?Added=20pgsql=20support=20for=20jellyfin?= =?UTF-8?q?=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20250127174201_InitMigration.Designer.cs | 1624 +++++++++++++++++ .../20250127174201_InitMigration.cs | 1104 +++++++++++ .../JellyfinDbContextModelSnapshot.cs | 1621 ++++++++++++++++ .../PgSqlDesignTimeJellyfinDbFactory.cs | 26 + .../PgSqlDatabaseProvider.cs | 75 + ...s => SqliteDesignTimeJellyfinDbFactory.cs} | 2 +- .../DatabaseConfigurationOptions.cs | 5 + .../DbConfiguration/PostgreSqlOptions.cs | 39 + 8 files changed, 4495 insertions(+), 1 deletion(-) create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs rename Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/{DesignTimeJellyfinDbFactory.cs => SqliteDesignTimeJellyfinDbFactory.cs} (89%) create mode 100644 Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs new file mode 100644 index 0000000000..47fff07214 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs @@ -0,0 +1,1624 @@ +// +using System; +using Jellyfin.Server.Implementations; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Jellyfin.Database.Providers.PgSql.Migrations +{ + [DbContext(typeof(JellyfinDbContext))] + [Migration("20250127174201_InitMigration")] + partial class InitMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "9.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DayOfWeek") + .HasColumnType("integer"); + + b.Property("EndHour") + .HasColumnType("double precision"); + + b.Property("StartHour") + .HasColumnType("double precision"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AccessSchedules"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("ItemId") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("LogSeverity") + .HasColumnType("integer"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("Overview") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("ShortOverview") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("DateCreated"); + + b.ToTable("ActivityLogs"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ParentItemId") + .HasColumnType("uuid"); + + b.HasKey("ItemId", "ParentItemId"); + + b.HasIndex("ParentItemId"); + + b.ToTable("AncestorIds"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Index") + .HasColumnType("integer"); + + b.Property("Codec") + .IsRequired() + .HasColumnType("text"); + + b.Property("CodecTag") + .HasColumnType("text"); + + b.Property("Comment") + .HasColumnType("text"); + + b.Property("Filename") + .HasColumnType("text"); + + b.Property("MimeType") + .HasColumnType("text"); + + b.HasKey("ItemId", "Index"); + + b.ToTable("AttachmentStreamInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Album") + .HasColumnType("text"); + + b.Property("AlbumArtists") + .HasColumnType("text"); + + b.Property("Artists") + .HasColumnType("text"); + + b.Property("Audio") + .HasColumnType("integer"); + + b.Property("ChannelId") + .HasColumnType("text"); + + b.Property("CleanName") + .HasColumnType("text"); + + b.Property("CommunityRating") + .HasColumnType("real"); + + b.Property("CriticRating") + .HasColumnType("real"); + + b.Property("CustomRating") + .HasColumnType("text"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastMediaAdded") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastRefreshed") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastSaved") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("EndDate") + .HasColumnType("timestamp with time zone"); + + b.Property("EpisodeTitle") + .HasColumnType("text"); + + b.Property("ExternalId") + .HasColumnType("text"); + + b.Property("ExternalSeriesId") + .HasColumnType("text"); + + b.Property("ExternalServiceId") + .HasColumnType("text"); + + b.Property("ExtraIds") + .HasColumnType("text"); + + b.Property("ExtraType") + .HasColumnType("integer"); + + b.Property("ForcedSortName") + .HasColumnType("text"); + + b.Property("Genres") + .HasColumnType("text"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("IndexNumber") + .HasColumnType("integer"); + + b.Property("InheritedParentalRatingValue") + .HasColumnType("integer"); + + b.Property("IsFolder") + .HasColumnType("boolean"); + + b.Property("IsInMixedFolder") + .HasColumnType("boolean"); + + b.Property("IsLocked") + .HasColumnType("boolean"); + + b.Property("IsMovie") + .HasColumnType("boolean"); + + b.Property("IsRepeat") + .HasColumnType("boolean"); + + b.Property("IsSeries") + .HasColumnType("boolean"); + + b.Property("IsVirtualItem") + .HasColumnType("boolean"); + + b.Property("LUFS") + .HasColumnType("real"); + + b.Property("MediaType") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("NormalizationGain") + .HasColumnType("real"); + + b.Property("OfficialRating") + .HasColumnType("text"); + + b.Property("OriginalTitle") + .HasColumnType("text"); + + b.Property("Overview") + .HasColumnType("text"); + + b.Property("OwnerId") + .HasColumnType("text"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("ParentIndexNumber") + .HasColumnType("integer"); + + b.Property("Path") + .HasColumnType("text"); + + b.Property("PreferredMetadataCountryCode") + .HasColumnType("text"); + + b.Property("PreferredMetadataLanguage") + .HasColumnType("text"); + + b.Property("PremiereDate") + .HasColumnType("timestamp with time zone"); + + b.Property("PresentationUniqueKey") + .HasColumnType("text"); + + b.Property("PrimaryVersionId") + .HasColumnType("text"); + + b.Property("ProductionLocations") + .HasColumnType("text"); + + b.Property("ProductionYear") + .HasColumnType("integer"); + + b.Property("RunTimeTicks") + .HasColumnType("bigint"); + + b.Property("SeasonId") + .HasColumnType("uuid"); + + b.Property("SeasonName") + .HasColumnType("text"); + + b.Property("SeriesId") + .HasColumnType("uuid"); + + b.Property("SeriesName") + .HasColumnType("text"); + + b.Property("SeriesPresentationUniqueKey") + .HasColumnType("text"); + + b.Property("ShowId") + .HasColumnType("text"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("SortName") + .HasColumnType("text"); + + b.Property("StartDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Studios") + .HasColumnType("text"); + + b.Property("Tagline") + .HasColumnType("text"); + + b.Property("Tags") + .HasColumnType("text"); + + b.Property("TopParentId") + .HasColumnType("uuid"); + + b.Property("TotalBitrate") + .HasColumnType("integer"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("UnratedType") + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.HasIndex("Path"); + + b.HasIndex("PresentationUniqueKey"); + + b.HasIndex("TopParentId", "Id"); + + b.HasIndex("Type", "TopParentId", "Id"); + + b.HasIndex("Type", "TopParentId", "PresentationUniqueKey"); + + b.HasIndex("Type", "TopParentId", "StartDate"); + + b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem"); + + b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey"); + + b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem"); + + b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName"); + + b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); + + b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); + + b.ToTable("BaseItems"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Blurhash") + .HasColumnType("bytea"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("ImageType") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Path") + .IsRequired() + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemImageInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => + { + b.Property("Id") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.HasKey("Id", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemMetadataFields"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ProviderId") + .HasColumnType("text"); + + b.Property("ProviderValue") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("ItemId", "ProviderId"); + + b.HasIndex("ProviderId", "ProviderValue", "ItemId"); + + b.ToTable("BaseItemProviders"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => + { + b.Property("Id") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.HasKey("Id", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemTrailerTypes"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ChapterIndex") + .HasColumnType("integer"); + + b.Property("ImageDateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("ImagePath") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("StartPositionTicks") + .HasColumnType("bigint"); + + b.HasKey("ItemId", "ChapterIndex"); + + b.ToTable("Chapters"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Key") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemId", "Client", "Key") + .IsUnique(); + + b.ToTable("CustomItemDisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChromecastVersion") + .HasColumnType("integer"); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DashboardTheme") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("EnableNextVideoInfoOverlay") + .HasColumnType("boolean"); + + b.Property("IndexBy") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ScrollDirection") + .HasColumnType("integer"); + + b.Property("ShowBackdrop") + .HasColumnType("boolean"); + + b.Property("ShowSidebar") + .HasColumnType("boolean"); + + b.Property("SkipBackwardLength") + .HasColumnType("integer"); + + b.Property("SkipForwardLength") + .HasColumnType("integer"); + + b.Property("TvHome") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemId", "Client") + .IsUnique(); + + b.ToTable("DisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DisplayPreferencesId") + .HasColumnType("integer"); + + b.Property("Order") + .HasColumnType("integer"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DisplayPreferencesId"); + + b.ToTable("HomeSection"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("ImageInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("IndexBy") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("RememberIndexing") + .HasColumnType("boolean"); + + b.Property("RememberSorting") + .HasColumnType("boolean"); + + b.Property("SortBy") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("SortOrder") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("ViewType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("ItemDisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => + { + b.Property("ItemValueId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CleanValue") + .IsRequired() + .HasColumnType("text"); + + b.Property("Type") + .HasColumnType("integer"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("ItemValueId"); + + b.HasIndex("Type", "CleanValue") + .IsUnique(); + + b.ToTable("ItemValues"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => + { + b.Property("ItemValueId") + .HasColumnType("uuid"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.HasKey("ItemValueId", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("ItemValuesMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EndTicks") + .HasColumnType("bigint"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("SegmentProviderId") + .IsRequired() + .HasColumnType("text"); + + b.Property("StartTicks") + .HasColumnType("bigint"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("MediaSegments"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("StreamIndex") + .HasColumnType("integer"); + + b.Property("AspectRatio") + .HasColumnType("text"); + + b.Property("AverageFrameRate") + .HasColumnType("real"); + + b.Property("BitDepth") + .HasColumnType("integer"); + + b.Property("BitRate") + .HasColumnType("integer"); + + b.Property("BlPresentFlag") + .HasColumnType("integer"); + + b.Property("ChannelLayout") + .HasColumnType("text"); + + b.Property("Channels") + .HasColumnType("integer"); + + b.Property("Codec") + .HasColumnType("text"); + + b.Property("CodecTag") + .HasColumnType("text"); + + b.Property("CodecTimeBase") + .HasColumnType("text"); + + b.Property("ColorPrimaries") + .HasColumnType("text"); + + b.Property("ColorSpace") + .HasColumnType("text"); + + b.Property("ColorTransfer") + .HasColumnType("text"); + + b.Property("Comment") + .HasColumnType("text"); + + b.Property("DvBlSignalCompatibilityId") + .HasColumnType("integer"); + + b.Property("DvLevel") + .HasColumnType("integer"); + + b.Property("DvProfile") + .HasColumnType("integer"); + + b.Property("DvVersionMajor") + .HasColumnType("integer"); + + b.Property("DvVersionMinor") + .HasColumnType("integer"); + + b.Property("ElPresentFlag") + .HasColumnType("integer"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("IsAnamorphic") + .HasColumnType("boolean"); + + b.Property("IsAvc") + .HasColumnType("boolean"); + + b.Property("IsDefault") + .HasColumnType("boolean"); + + b.Property("IsExternal") + .HasColumnType("boolean"); + + b.Property("IsForced") + .HasColumnType("boolean"); + + b.Property("IsHearingImpaired") + .HasColumnType("boolean"); + + b.Property("IsInterlaced") + .HasColumnType("boolean"); + + b.Property("KeyFrames") + .HasColumnType("text"); + + b.Property("Language") + .HasColumnType("text"); + + b.Property("Level") + .HasColumnType("real"); + + b.Property("NalLengthSize") + .HasColumnType("text"); + + b.Property("Path") + .HasColumnType("text"); + + b.Property("PixelFormat") + .HasColumnType("text"); + + b.Property("Profile") + .HasColumnType("text"); + + b.Property("RealFrameRate") + .HasColumnType("real"); + + b.Property("RefFrames") + .HasColumnType("integer"); + + b.Property("Rotation") + .HasColumnType("integer"); + + b.Property("RpuPresentFlag") + .HasColumnType("integer"); + + b.Property("SampleRate") + .HasColumnType("integer"); + + b.Property("StreamType") + .HasColumnType("integer"); + + b.Property("TimeBase") + .HasColumnType("text"); + + b.Property("Title") + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasKey("ItemId", "StreamIndex"); + + b.HasIndex("StreamIndex"); + + b.HasIndex("StreamType"); + + b.HasIndex("StreamIndex", "StreamType"); + + b.HasIndex("StreamIndex", "StreamType", "Language"); + + b.ToTable("MediaStreamInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.People", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("PersonType") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("Peoples"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("PeopleId") + .HasColumnType("uuid"); + + b.Property("ListOrder") + .HasColumnType("integer"); + + b.Property("Role") + .HasColumnType("text"); + + b.Property("SortOrder") + .HasColumnType("integer"); + + b.HasKey("ItemId", "PeopleId"); + + b.HasIndex("PeopleId"); + + b.HasIndex("ItemId", "ListOrder"); + + b.HasIndex("ItemId", "SortOrder"); + + b.ToTable("PeopleBaseItemMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Kind") + .HasColumnType("integer"); + + b.Property("Permission_Permissions_Guid") + .HasColumnType("uuid"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("Value") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Kind") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Permissions"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Kind") + .HasColumnType("integer"); + + b.Property("Preference_Preferences_Guid") + .HasColumnType("uuid"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(65535) + .HasColumnType("character varying(65535)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Kind") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Preferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastActivity") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("AccessToken") + .IsUnique(); + + b.ToTable("ApiKeys"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("text"); + + b.Property("AppName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("AppVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastActivity") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("DeviceId"); + + b.HasIndex("AccessToken", "DateLastActivity"); + + b.HasIndex("DeviceId", "DateLastActivity"); + + b.HasIndex("UserId", "DeviceId"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CustomName") + .HasColumnType("text"); + + b.Property("DeviceId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.ToTable("DeviceOptions"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Width") + .HasColumnType("integer"); + + b.Property("Bandwidth") + .HasColumnType("integer"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("Interval") + .HasColumnType("integer"); + + b.Property("ThumbnailCount") + .HasColumnType("integer"); + + b.Property("TileHeight") + .HasColumnType("integer"); + + b.Property("TileWidth") + .HasColumnType("integer"); + + b.HasKey("ItemId", "Width"); + + b.ToTable("TrickplayInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AudioLanguagePreference") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AuthenticationProviderId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("CastReceiverId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DisplayCollectionsView") + .HasColumnType("boolean"); + + b.Property("DisplayMissingEpisodes") + .HasColumnType("boolean"); + + b.Property("EnableAutoLogin") + .HasColumnType("boolean"); + + b.Property("EnableLocalPassword") + .HasColumnType("boolean"); + + b.Property("EnableNextEpisodeAutoPlay") + .HasColumnType("boolean"); + + b.Property("EnableUserPreferenceAccess") + .HasColumnType("boolean"); + + b.Property("HidePlayedInLatest") + .HasColumnType("boolean"); + + b.Property("InternalId") + .HasColumnType("bigint"); + + b.Property("InvalidLoginAttemptCount") + .HasColumnType("integer"); + + b.Property("LastActivityDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LastLoginDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LoginAttemptsBeforeLockout") + .HasColumnType("integer"); + + b.Property("MaxActiveSessions") + .HasColumnType("integer"); + + b.Property("MaxParentalAgeRating") + .HasColumnType("integer"); + + b.Property("MustUpdatePassword") + .HasColumnType("boolean"); + + b.Property("Password") + .HasMaxLength(65535) + .HasColumnType("character varying(65535)"); + + b.Property("PasswordResetProviderId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("PlayDefaultAudioTrack") + .HasColumnType("boolean"); + + b.Property("RememberAudioSelections") + .HasColumnType("boolean"); + + b.Property("RememberSubtitleSelections") + .HasColumnType("boolean"); + + b.Property("RemoteClientBitrateLimit") + .HasColumnType("integer"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("SubtitleLanguagePreference") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("SubtitleMode") + .HasColumnType("integer"); + + b.Property("SyncPlayAccess") + .HasColumnType("integer"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .UseCollation("NOCASE"); + + b.HasKey("Id"); + + b.HasIndex("Username") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CustomDataKey") + .HasColumnType("text"); + + b.Property("AudioStreamIndex") + .HasColumnType("integer"); + + b.Property("IsFavorite") + .HasColumnType("boolean"); + + b.Property("LastPlayedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Likes") + .HasColumnType("boolean"); + + b.Property("PlayCount") + .HasColumnType("integer"); + + b.Property("PlaybackPositionTicks") + .HasColumnType("bigint"); + + b.Property("Played") + .HasColumnType("boolean"); + + b.Property("Rating") + .HasColumnType("double precision"); + + b.Property("SubtitleStreamIndex") + .HasColumnType("integer"); + + b.HasKey("ItemId", "UserId", "CustomDataKey"); + + b.HasIndex("UserId"); + + b.HasIndex("ItemId", "UserId", "IsFavorite"); + + b.HasIndex("ItemId", "UserId", "LastPlayedDate"); + + b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks"); + + b.HasIndex("ItemId", "UserId", "Played"); + + b.ToTable("UserData"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("AccessSchedules") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Children") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem") + .WithMany("ParentAncestors") + .HasForeignKey("ParentItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("ParentItem"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany() + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Images") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("LockedFields") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Provider") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("TrailerTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Chapters") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("DisplayPreferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => + { + b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null) + .WithMany("HomeSections") + .HasForeignKey("DisplayPreferencesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithOne("ProfileImage") + .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("ItemDisplayPreferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("ItemValues") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue") + .WithMany("BaseItemsMap") + .HasForeignKey("ItemValueId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("ItemValue"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("MediaStreams") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Peoples") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.People", "People") + .WithMany("BaseItems") + .HasForeignKey("PeopleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("People"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("Permissions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("Preferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => + { + b.HasOne("Jellyfin.Data.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("UserData") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => + { + b.Navigation("Chapters"); + + b.Navigation("Children"); + + b.Navigation("Images"); + + b.Navigation("ItemValues"); + + b.Navigation("LockedFields"); + + b.Navigation("MediaStreams"); + + b.Navigation("ParentAncestors"); + + b.Navigation("Peoples"); + + b.Navigation("Provider"); + + b.Navigation("TrailerTypes"); + + b.Navigation("UserData"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.Navigation("HomeSections"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => + { + b.Navigation("BaseItemsMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.People", b => + { + b.Navigation("BaseItems"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.User", b => + { + b.Navigation("AccessSchedules"); + + b.Navigation("DisplayPreferences"); + + b.Navigation("ItemDisplayPreferences"); + + b.Navigation("Permissions"); + + b.Navigation("Preferences"); + + b.Navigation("ProfileImage"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs new file mode 100644 index 0000000000..f1d0d15647 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs @@ -0,0 +1,1104 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Jellyfin.Database.Providers.PgSql.Migrations +{ + /// + public partial class InitMigration : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ActivityLogs", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + Name = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), + Overview = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + ShortOverview = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + Type = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + ItemId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + DateCreated = table.Column(type: "timestamp with time zone", nullable: false), + LogSeverity = table.Column(type: "integer", nullable: false), + RowVersion = table.Column(type: "bigint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ActivityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ApiKeys", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + DateCreated = table.Column(type: "timestamp with time zone", nullable: false), + DateLastActivity = table.Column(type: "timestamp with time zone", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + AccessToken = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ApiKeys", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "BaseItems", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "text", nullable: false), + Data = table.Column(type: "text", nullable: true), + Path = table.Column(type: "text", nullable: true), + StartDate = table.Column(type: "timestamp with time zone", nullable: false), + EndDate = table.Column(type: "timestamp with time zone", nullable: false), + ChannelId = table.Column(type: "text", nullable: true), + IsMovie = table.Column(type: "boolean", nullable: false), + CommunityRating = table.Column(type: "real", nullable: true), + CustomRating = table.Column(type: "text", nullable: true), + IndexNumber = table.Column(type: "integer", nullable: true), + IsLocked = table.Column(type: "boolean", nullable: false), + Name = table.Column(type: "text", nullable: true), + OfficialRating = table.Column(type: "text", nullable: true), + MediaType = table.Column(type: "text", nullable: true), + Overview = table.Column(type: "text", nullable: true), + ParentIndexNumber = table.Column(type: "integer", nullable: true), + PremiereDate = table.Column(type: "timestamp with time zone", nullable: true), + ProductionYear = table.Column(type: "integer", nullable: true), + Genres = table.Column(type: "text", nullable: true), + SortName = table.Column(type: "text", nullable: true), + ForcedSortName = table.Column(type: "text", nullable: true), + RunTimeTicks = table.Column(type: "bigint", nullable: true), + DateCreated = table.Column(type: "timestamp with time zone", nullable: true), + DateModified = table.Column(type: "timestamp with time zone", nullable: true), + IsSeries = table.Column(type: "boolean", nullable: false), + EpisodeTitle = table.Column(type: "text", nullable: true), + IsRepeat = table.Column(type: "boolean", nullable: false), + PreferredMetadataLanguage = table.Column(type: "text", nullable: true), + PreferredMetadataCountryCode = table.Column(type: "text", nullable: true), + DateLastRefreshed = table.Column(type: "timestamp with time zone", nullable: true), + DateLastSaved = table.Column(type: "timestamp with time zone", nullable: true), + IsInMixedFolder = table.Column(type: "boolean", nullable: false), + Studios = table.Column(type: "text", nullable: true), + ExternalServiceId = table.Column(type: "text", nullable: true), + Tags = table.Column(type: "text", nullable: true), + IsFolder = table.Column(type: "boolean", nullable: false), + InheritedParentalRatingValue = table.Column(type: "integer", nullable: true), + UnratedType = table.Column(type: "text", nullable: true), + CriticRating = table.Column(type: "real", nullable: true), + CleanName = table.Column(type: "text", nullable: true), + PresentationUniqueKey = table.Column(type: "text", nullable: true), + OriginalTitle = table.Column(type: "text", nullable: true), + PrimaryVersionId = table.Column(type: "text", nullable: true), + DateLastMediaAdded = table.Column(type: "timestamp with time zone", nullable: true), + Album = table.Column(type: "text", nullable: true), + LUFS = table.Column(type: "real", nullable: true), + NormalizationGain = table.Column(type: "real", nullable: true), + IsVirtualItem = table.Column(type: "boolean", nullable: false), + SeriesName = table.Column(type: "text", nullable: true), + SeasonName = table.Column(type: "text", nullable: true), + ExternalSeriesId = table.Column(type: "text", nullable: true), + Tagline = table.Column(type: "text", nullable: true), + ProductionLocations = table.Column(type: "text", nullable: true), + ExtraIds = table.Column(type: "text", nullable: true), + TotalBitrate = table.Column(type: "integer", nullable: true), + ExtraType = table.Column(type: "integer", nullable: true), + Artists = table.Column(type: "text", nullable: true), + AlbumArtists = table.Column(type: "text", nullable: true), + ExternalId = table.Column(type: "text", nullable: true), + SeriesPresentationUniqueKey = table.Column(type: "text", nullable: true), + ShowId = table.Column(type: "text", nullable: true), + OwnerId = table.Column(type: "text", nullable: true), + Width = table.Column(type: "integer", nullable: true), + Height = table.Column(type: "integer", nullable: true), + Size = table.Column(type: "bigint", nullable: true), + Audio = table.Column(type: "integer", nullable: true), + ParentId = table.Column(type: "uuid", nullable: true), + TopParentId = table.Column(type: "uuid", nullable: true), + SeasonId = table.Column(type: "uuid", nullable: true), + SeriesId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_BaseItems", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CustomItemDisplayPreferences", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false), + Client = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + Key = table.Column(type: "text", nullable: false), + Value = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CustomItemDisplayPreferences", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DeviceOptions", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + DeviceId = table.Column(type: "text", nullable: false), + CustomName = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DeviceOptions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ItemValues", + columns: table => new + { + ItemValueId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "integer", nullable: false), + Value = table.Column(type: "text", nullable: false), + CleanValue = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ItemValues", x => x.ItemValueId); + }); + + migrationBuilder.CreateTable( + name: "MediaSegments", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "integer", nullable: false), + EndTicks = table.Column(type: "bigint", nullable: false), + StartTicks = table.Column(type: "bigint", nullable: false), + SegmentProviderId = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_MediaSegments", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Peoples", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "text", nullable: false), + PersonType = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Peoples", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "TrickplayInfos", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + Width = table.Column(type: "integer", nullable: false), + Height = table.Column(type: "integer", nullable: false), + TileWidth = table.Column(type: "integer", nullable: false), + TileHeight = table.Column(type: "integer", nullable: false), + ThumbnailCount = table.Column(type: "integer", nullable: false), + Interval = table.Column(type: "integer", nullable: false), + Bandwidth = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TrickplayInfos", x => new { x.ItemId, x.Width }); + }); + + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Username = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, collation: "NOCASE"), + Password = table.Column(type: "character varying(65535)", maxLength: 65535, nullable: true), + MustUpdatePassword = table.Column(type: "boolean", nullable: false), + AudioLanguagePreference = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), + AuthenticationProviderId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + PasswordResetProviderId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + InvalidLoginAttemptCount = table.Column(type: "integer", nullable: false), + LastActivityDate = table.Column(type: "timestamp with time zone", nullable: true), + LastLoginDate = table.Column(type: "timestamp with time zone", nullable: true), + LoginAttemptsBeforeLockout = table.Column(type: "integer", nullable: true), + MaxActiveSessions = table.Column(type: "integer", nullable: false), + SubtitleMode = table.Column(type: "integer", nullable: false), + PlayDefaultAudioTrack = table.Column(type: "boolean", nullable: false), + SubtitleLanguagePreference = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), + DisplayMissingEpisodes = table.Column(type: "boolean", nullable: false), + DisplayCollectionsView = table.Column(type: "boolean", nullable: false), + EnableLocalPassword = table.Column(type: "boolean", nullable: false), + HidePlayedInLatest = table.Column(type: "boolean", nullable: false), + RememberAudioSelections = table.Column(type: "boolean", nullable: false), + RememberSubtitleSelections = table.Column(type: "boolean", nullable: false), + EnableNextEpisodeAutoPlay = table.Column(type: "boolean", nullable: false), + EnableAutoLogin = table.Column(type: "boolean", nullable: false), + EnableUserPreferenceAccess = table.Column(type: "boolean", nullable: false), + MaxParentalAgeRating = table.Column(type: "integer", nullable: true), + RemoteClientBitrateLimit = table.Column(type: "integer", nullable: true), + InternalId = table.Column(type: "bigint", nullable: false), + SyncPlayAccess = table.Column(type: "integer", nullable: false), + CastReceiverId = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), + RowVersion = table.Column(type: "bigint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AncestorIds", + columns: table => new + { + ParentItemId = table.Column(type: "uuid", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AncestorIds", x => new { x.ItemId, x.ParentItemId }); + table.ForeignKey( + name: "FK_AncestorIds_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AncestorIds_BaseItems_ParentItemId", + column: x => x.ParentItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AttachmentStreamInfos", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + Index = table.Column(type: "integer", nullable: false), + Codec = table.Column(type: "text", nullable: false), + CodecTag = table.Column(type: "text", nullable: true), + Comment = table.Column(type: "text", nullable: true), + Filename = table.Column(type: "text", nullable: true), + MimeType = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AttachmentStreamInfos", x => new { x.ItemId, x.Index }); + table.ForeignKey( + name: "FK_AttachmentStreamInfos_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "BaseItemImageInfos", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Path = table.Column(type: "text", nullable: false), + DateModified = table.Column(type: "timestamp with time zone", nullable: false), + ImageType = table.Column(type: "integer", nullable: false), + Width = table.Column(type: "integer", nullable: false), + Height = table.Column(type: "integer", nullable: false), + Blurhash = table.Column(type: "bytea", nullable: true), + ItemId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BaseItemImageInfos", x => x.Id); + table.ForeignKey( + name: "FK_BaseItemImageInfos_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "BaseItemMetadataFields", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BaseItemMetadataFields", x => new { x.Id, x.ItemId }); + table.ForeignKey( + name: "FK_BaseItemMetadataFields_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "BaseItemProviders", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + ProviderId = table.Column(type: "text", nullable: false), + ProviderValue = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BaseItemProviders", x => new { x.ItemId, x.ProviderId }); + table.ForeignKey( + name: "FK_BaseItemProviders_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "BaseItemTrailerTypes", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BaseItemTrailerTypes", x => new { x.Id, x.ItemId }); + table.ForeignKey( + name: "FK_BaseItemTrailerTypes_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Chapters", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + ChapterIndex = table.Column(type: "integer", nullable: false), + StartPositionTicks = table.Column(type: "bigint", nullable: false), + Name = table.Column(type: "text", nullable: true), + ImagePath = table.Column(type: "text", nullable: true), + ImageDateModified = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Chapters", x => new { x.ItemId, x.ChapterIndex }); + table.ForeignKey( + name: "FK_Chapters_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "MediaStreamInfos", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + StreamIndex = table.Column(type: "integer", nullable: false), + StreamType = table.Column(type: "integer", nullable: false), + Codec = table.Column(type: "text", nullable: true), + Language = table.Column(type: "text", nullable: true), + ChannelLayout = table.Column(type: "text", nullable: true), + Profile = table.Column(type: "text", nullable: true), + AspectRatio = table.Column(type: "text", nullable: true), + Path = table.Column(type: "text", nullable: true), + IsInterlaced = table.Column(type: "boolean", nullable: true), + BitRate = table.Column(type: "integer", nullable: true), + Channels = table.Column(type: "integer", nullable: true), + SampleRate = table.Column(type: "integer", nullable: true), + IsDefault = table.Column(type: "boolean", nullable: false), + IsForced = table.Column(type: "boolean", nullable: false), + IsExternal = table.Column(type: "boolean", nullable: false), + Height = table.Column(type: "integer", nullable: true), + Width = table.Column(type: "integer", nullable: true), + AverageFrameRate = table.Column(type: "real", nullable: true), + RealFrameRate = table.Column(type: "real", nullable: true), + Level = table.Column(type: "real", nullable: true), + PixelFormat = table.Column(type: "text", nullable: true), + BitDepth = table.Column(type: "integer", nullable: true), + IsAnamorphic = table.Column(type: "boolean", nullable: true), + RefFrames = table.Column(type: "integer", nullable: true), + CodecTag = table.Column(type: "text", nullable: true), + Comment = table.Column(type: "text", nullable: true), + NalLengthSize = table.Column(type: "text", nullable: true), + IsAvc = table.Column(type: "boolean", nullable: true), + Title = table.Column(type: "text", nullable: true), + TimeBase = table.Column(type: "text", nullable: true), + CodecTimeBase = table.Column(type: "text", nullable: true), + ColorPrimaries = table.Column(type: "text", nullable: true), + ColorSpace = table.Column(type: "text", nullable: true), + ColorTransfer = table.Column(type: "text", nullable: true), + DvVersionMajor = table.Column(type: "integer", nullable: true), + DvVersionMinor = table.Column(type: "integer", nullable: true), + DvProfile = table.Column(type: "integer", nullable: true), + DvLevel = table.Column(type: "integer", nullable: true), + RpuPresentFlag = table.Column(type: "integer", nullable: true), + ElPresentFlag = table.Column(type: "integer", nullable: true), + BlPresentFlag = table.Column(type: "integer", nullable: true), + DvBlSignalCompatibilityId = table.Column(type: "integer", nullable: true), + IsHearingImpaired = table.Column(type: "boolean", nullable: true), + Rotation = table.Column(type: "integer", nullable: true), + KeyFrames = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_MediaStreamInfos", x => new { x.ItemId, x.StreamIndex }); + table.ForeignKey( + name: "FK_MediaStreamInfos_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ItemValuesMap", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + ItemValueId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ItemValuesMap", x => new { x.ItemValueId, x.ItemId }); + table.ForeignKey( + name: "FK_ItemValuesMap_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ItemValuesMap_ItemValues_ItemValueId", + column: x => x.ItemValueId, + principalTable: "ItemValues", + principalColumn: "ItemValueId", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "PeopleBaseItemMap", + columns: table => new + { + ItemId = table.Column(type: "uuid", nullable: false), + PeopleId = table.Column(type: "uuid", nullable: false), + SortOrder = table.Column(type: "integer", nullable: true), + ListOrder = table.Column(type: "integer", nullable: true), + Role = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PeopleBaseItemMap", x => new { x.ItemId, x.PeopleId }); + table.ForeignKey( + name: "FK_PeopleBaseItemMap_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_PeopleBaseItemMap_Peoples_PeopleId", + column: x => x.PeopleId, + principalTable: "Peoples", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AccessSchedules", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: false), + DayOfWeek = table.Column(type: "integer", nullable: false), + StartHour = table.Column(type: "double precision", nullable: false), + EndHour = table.Column(type: "double precision", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AccessSchedules", x => x.Id); + table.ForeignKey( + name: "FK_AccessSchedules_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Devices", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: false), + AccessToken = table.Column(type: "text", nullable: false), + AppName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + AppVersion = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + DeviceName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + DeviceId = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsActive = table.Column(type: "boolean", nullable: false), + DateCreated = table.Column(type: "timestamp with time zone", nullable: false), + DateModified = table.Column(type: "timestamp with time zone", nullable: false), + DateLastActivity = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Devices", x => x.Id); + table.ForeignKey( + name: "FK_Devices_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DisplayPreferences", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false), + Client = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + ShowSidebar = table.Column(type: "boolean", nullable: false), + ShowBackdrop = table.Column(type: "boolean", nullable: false), + ScrollDirection = table.Column(type: "integer", nullable: false), + IndexBy = table.Column(type: "integer", nullable: true), + SkipForwardLength = table.Column(type: "integer", nullable: false), + SkipBackwardLength = table.Column(type: "integer", nullable: false), + ChromecastVersion = table.Column(type: "integer", nullable: false), + EnableNextVideoInfoOverlay = table.Column(type: "boolean", nullable: false), + DashboardTheme = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), + TvHome = table.Column(type: "character varying(32)", maxLength: 32, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DisplayPreferences", x => x.Id); + table.ForeignKey( + name: "FK_DisplayPreferences_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ImageInfos", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: true), + Path = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), + LastModified = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ImageInfos", x => x.Id); + table.ForeignKey( + name: "FK_ImageInfos_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ItemDisplayPreferences", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false), + Client = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + ViewType = table.Column(type: "integer", nullable: false), + RememberIndexing = table.Column(type: "boolean", nullable: false), + IndexBy = table.Column(type: "integer", nullable: true), + RememberSorting = table.Column(type: "boolean", nullable: false), + SortBy = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + SortOrder = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ItemDisplayPreferences", x => x.Id); + table.ForeignKey( + name: "FK_ItemDisplayPreferences_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Permissions", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: true), + Kind = table.Column(type: "integer", nullable: false), + Value = table.Column(type: "boolean", nullable: false), + RowVersion = table.Column(type: "bigint", nullable: false), + Permission_Permissions_Guid = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Permissions", x => x.Id); + table.ForeignKey( + name: "FK_Permissions_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Preferences", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + UserId = table.Column(type: "uuid", nullable: true), + Kind = table.Column(type: "integer", nullable: false), + Value = table.Column(type: "character varying(65535)", maxLength: 65535, nullable: false), + RowVersion = table.Column(type: "bigint", nullable: false), + Preference_Preferences_Guid = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Preferences", x => x.Id); + table.ForeignKey( + name: "FK_Preferences_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserData", + columns: table => new + { + CustomDataKey = table.Column(type: "text", nullable: false), + ItemId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + Rating = table.Column(type: "double precision", nullable: true), + PlaybackPositionTicks = table.Column(type: "bigint", nullable: false), + PlayCount = table.Column(type: "integer", nullable: false), + IsFavorite = table.Column(type: "boolean", nullable: false), + LastPlayedDate = table.Column(type: "timestamp with time zone", nullable: true), + Played = table.Column(type: "boolean", nullable: false), + AudioStreamIndex = table.Column(type: "integer", nullable: true), + SubtitleStreamIndex = table.Column(type: "integer", nullable: true), + Likes = table.Column(type: "boolean", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserData", x => new { x.ItemId, x.UserId, x.CustomDataKey }); + table.ForeignKey( + name: "FK_UserData_BaseItems_ItemId", + column: x => x.ItemId, + principalTable: "BaseItems", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserData_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "HomeSection", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + DisplayPreferencesId = table.Column(type: "integer", nullable: false), + Order = table.Column(type: "integer", nullable: false), + Type = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_HomeSection", x => x.Id); + table.ForeignKey( + name: "FK_HomeSection_DisplayPreferences_DisplayPreferencesId", + column: x => x.DisplayPreferencesId, + principalTable: "DisplayPreferences", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AccessSchedules_UserId", + table: "AccessSchedules", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_ActivityLogs_DateCreated", + table: "ActivityLogs", + column: "DateCreated"); + + migrationBuilder.CreateIndex( + name: "IX_AncestorIds_ParentItemId", + table: "AncestorIds", + column: "ParentItemId"); + + migrationBuilder.CreateIndex( + name: "IX_ApiKeys_AccessToken", + table: "ApiKeys", + column: "AccessToken", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_BaseItemImageInfos_ItemId", + table: "BaseItemImageInfos", + column: "ItemId"); + + migrationBuilder.CreateIndex( + name: "IX_BaseItemMetadataFields_ItemId", + table: "BaseItemMetadataFields", + column: "ItemId"); + + migrationBuilder.CreateIndex( + name: "IX_BaseItemProviders_ProviderId_ProviderValue_ItemId", + table: "BaseItemProviders", + columns: new[] { "ProviderId", "ProviderValue", "ItemId" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Id_Type_IsFolder_IsVirtualItem", + table: "BaseItems", + columns: new[] { "Id", "Type", "IsFolder", "IsVirtualItem" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_IsFolder_TopParentId_IsVirtualItem_PresentationUn~", + table: "BaseItems", + columns: new[] { "IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_MediaType_TopParentId_IsVirtualItem_PresentationU~", + table: "BaseItems", + columns: new[] { "MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_ParentId", + table: "BaseItems", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Path", + table: "BaseItems", + column: "Path"); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_PresentationUniqueKey", + table: "BaseItems", + column: "PresentationUniqueKey"); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_TopParentId_Id", + table: "BaseItems", + columns: new[] { "TopParentId", "Id" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Type_SeriesPresentationUniqueKey_IsFolder_IsVirtu~", + table: "BaseItems", + columns: new[] { "Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Type_SeriesPresentationUniqueKey_PresentationUniq~", + table: "BaseItems", + columns: new[] { "Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Type_TopParentId_Id", + table: "BaseItems", + columns: new[] { "Type", "TopParentId", "Id" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Type_TopParentId_IsVirtualItem_PresentationUnique~", + table: "BaseItems", + columns: new[] { "Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Type_TopParentId_PresentationUniqueKey", + table: "BaseItems", + columns: new[] { "Type", "TopParentId", "PresentationUniqueKey" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItems_Type_TopParentId_StartDate", + table: "BaseItems", + columns: new[] { "Type", "TopParentId", "StartDate" }); + + migrationBuilder.CreateIndex( + name: "IX_BaseItemTrailerTypes_ItemId", + table: "BaseItemTrailerTypes", + column: "ItemId"); + + migrationBuilder.CreateIndex( + name: "IX_CustomItemDisplayPreferences_UserId_ItemId_Client_Key", + table: "CustomItemDisplayPreferences", + columns: new[] { "UserId", "ItemId", "Client", "Key" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_DeviceOptions_DeviceId", + table: "DeviceOptions", + column: "DeviceId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Devices_AccessToken_DateLastActivity", + table: "Devices", + columns: new[] { "AccessToken", "DateLastActivity" }); + + migrationBuilder.CreateIndex( + name: "IX_Devices_DeviceId", + table: "Devices", + column: "DeviceId"); + + migrationBuilder.CreateIndex( + name: "IX_Devices_DeviceId_DateLastActivity", + table: "Devices", + columns: new[] { "DeviceId", "DateLastActivity" }); + + migrationBuilder.CreateIndex( + name: "IX_Devices_UserId_DeviceId", + table: "Devices", + columns: new[] { "UserId", "DeviceId" }); + + migrationBuilder.CreateIndex( + name: "IX_DisplayPreferences_UserId_ItemId_Client", + table: "DisplayPreferences", + columns: new[] { "UserId", "ItemId", "Client" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_HomeSection_DisplayPreferencesId", + table: "HomeSection", + column: "DisplayPreferencesId"); + + migrationBuilder.CreateIndex( + name: "IX_ImageInfos_UserId", + table: "ImageInfos", + column: "UserId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_ItemDisplayPreferences_UserId", + table: "ItemDisplayPreferences", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_ItemValues_Type_CleanValue", + table: "ItemValues", + columns: new[] { "Type", "CleanValue" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_ItemValuesMap_ItemId", + table: "ItemValuesMap", + column: "ItemId"); + + migrationBuilder.CreateIndex( + name: "IX_MediaStreamInfos_StreamIndex", + table: "MediaStreamInfos", + column: "StreamIndex"); + + migrationBuilder.CreateIndex( + name: "IX_MediaStreamInfos_StreamIndex_StreamType", + table: "MediaStreamInfos", + columns: new[] { "StreamIndex", "StreamType" }); + + migrationBuilder.CreateIndex( + name: "IX_MediaStreamInfos_StreamIndex_StreamType_Language", + table: "MediaStreamInfos", + columns: new[] { "StreamIndex", "StreamType", "Language" }); + + migrationBuilder.CreateIndex( + name: "IX_MediaStreamInfos_StreamType", + table: "MediaStreamInfos", + column: "StreamType"); + + migrationBuilder.CreateIndex( + name: "IX_PeopleBaseItemMap_ItemId_ListOrder", + table: "PeopleBaseItemMap", + columns: new[] { "ItemId", "ListOrder" }); + + migrationBuilder.CreateIndex( + name: "IX_PeopleBaseItemMap_ItemId_SortOrder", + table: "PeopleBaseItemMap", + columns: new[] { "ItemId", "SortOrder" }); + + migrationBuilder.CreateIndex( + name: "IX_PeopleBaseItemMap_PeopleId", + table: "PeopleBaseItemMap", + column: "PeopleId"); + + migrationBuilder.CreateIndex( + name: "IX_Peoples_Name", + table: "Peoples", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_Permissions_UserId_Kind", + table: "Permissions", + columns: new[] { "UserId", "Kind" }, + unique: true, + filter: "[UserId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Preferences_UserId_Kind", + table: "Preferences", + columns: new[] { "UserId", "Kind" }, + unique: true, + filter: "[UserId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_UserData_ItemId_UserId_IsFavorite", + table: "UserData", + columns: new[] { "ItemId", "UserId", "IsFavorite" }); + + migrationBuilder.CreateIndex( + name: "IX_UserData_ItemId_UserId_LastPlayedDate", + table: "UserData", + columns: new[] { "ItemId", "UserId", "LastPlayedDate" }); + + migrationBuilder.CreateIndex( + name: "IX_UserData_ItemId_UserId_PlaybackPositionTicks", + table: "UserData", + columns: new[] { "ItemId", "UserId", "PlaybackPositionTicks" }); + + migrationBuilder.CreateIndex( + name: "IX_UserData_ItemId_UserId_Played", + table: "UserData", + columns: new[] { "ItemId", "UserId", "Played" }); + + migrationBuilder.CreateIndex( + name: "IX_UserData_UserId", + table: "UserData", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Users_Username", + table: "Users", + column: "Username", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AccessSchedules"); + + migrationBuilder.DropTable( + name: "ActivityLogs"); + + migrationBuilder.DropTable( + name: "AncestorIds"); + + migrationBuilder.DropTable( + name: "ApiKeys"); + + migrationBuilder.DropTable( + name: "AttachmentStreamInfos"); + + migrationBuilder.DropTable( + name: "BaseItemImageInfos"); + + migrationBuilder.DropTable( + name: "BaseItemMetadataFields"); + + migrationBuilder.DropTable( + name: "BaseItemProviders"); + + migrationBuilder.DropTable( + name: "BaseItemTrailerTypes"); + + migrationBuilder.DropTable( + name: "Chapters"); + + migrationBuilder.DropTable( + name: "CustomItemDisplayPreferences"); + + migrationBuilder.DropTable( + name: "DeviceOptions"); + + migrationBuilder.DropTable( + name: "Devices"); + + migrationBuilder.DropTable( + name: "HomeSection"); + + migrationBuilder.DropTable( + name: "ImageInfos"); + + migrationBuilder.DropTable( + name: "ItemDisplayPreferences"); + + migrationBuilder.DropTable( + name: "ItemValuesMap"); + + migrationBuilder.DropTable( + name: "MediaSegments"); + + migrationBuilder.DropTable( + name: "MediaStreamInfos"); + + migrationBuilder.DropTable( + name: "PeopleBaseItemMap"); + + migrationBuilder.DropTable( + name: "Permissions"); + + migrationBuilder.DropTable( + name: "Preferences"); + + migrationBuilder.DropTable( + name: "TrickplayInfos"); + + migrationBuilder.DropTable( + name: "UserData"); + + migrationBuilder.DropTable( + name: "DisplayPreferences"); + + migrationBuilder.DropTable( + name: "ItemValues"); + + migrationBuilder.DropTable( + name: "Peoples"); + + migrationBuilder.DropTable( + name: "BaseItems"); + + migrationBuilder.DropTable( + name: "Users"); + } + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs new file mode 100644 index 0000000000..cdaf257d4d --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs @@ -0,0 +1,1621 @@ +// +using System; +using Jellyfin.Server.Implementations; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Jellyfin.Database.Providers.PgSql.Migrations +{ + [DbContext(typeof(JellyfinDbContext))] + partial class JellyfinDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "9.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DayOfWeek") + .HasColumnType("integer"); + + b.Property("EndHour") + .HasColumnType("double precision"); + + b.Property("StartHour") + .HasColumnType("double precision"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AccessSchedules"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("ItemId") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("LogSeverity") + .HasColumnType("integer"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("Overview") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("ShortOverview") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("DateCreated"); + + b.ToTable("ActivityLogs"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ParentItemId") + .HasColumnType("uuid"); + + b.HasKey("ItemId", "ParentItemId"); + + b.HasIndex("ParentItemId"); + + b.ToTable("AncestorIds"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Index") + .HasColumnType("integer"); + + b.Property("Codec") + .IsRequired() + .HasColumnType("text"); + + b.Property("CodecTag") + .HasColumnType("text"); + + b.Property("Comment") + .HasColumnType("text"); + + b.Property("Filename") + .HasColumnType("text"); + + b.Property("MimeType") + .HasColumnType("text"); + + b.HasKey("ItemId", "Index"); + + b.ToTable("AttachmentStreamInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Album") + .HasColumnType("text"); + + b.Property("AlbumArtists") + .HasColumnType("text"); + + b.Property("Artists") + .HasColumnType("text"); + + b.Property("Audio") + .HasColumnType("integer"); + + b.Property("ChannelId") + .HasColumnType("text"); + + b.Property("CleanName") + .HasColumnType("text"); + + b.Property("CommunityRating") + .HasColumnType("real"); + + b.Property("CriticRating") + .HasColumnType("real"); + + b.Property("CustomRating") + .HasColumnType("text"); + + b.Property("Data") + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastMediaAdded") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastRefreshed") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastSaved") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("EndDate") + .HasColumnType("timestamp with time zone"); + + b.Property("EpisodeTitle") + .HasColumnType("text"); + + b.Property("ExternalId") + .HasColumnType("text"); + + b.Property("ExternalSeriesId") + .HasColumnType("text"); + + b.Property("ExternalServiceId") + .HasColumnType("text"); + + b.Property("ExtraIds") + .HasColumnType("text"); + + b.Property("ExtraType") + .HasColumnType("integer"); + + b.Property("ForcedSortName") + .HasColumnType("text"); + + b.Property("Genres") + .HasColumnType("text"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("IndexNumber") + .HasColumnType("integer"); + + b.Property("InheritedParentalRatingValue") + .HasColumnType("integer"); + + b.Property("IsFolder") + .HasColumnType("boolean"); + + b.Property("IsInMixedFolder") + .HasColumnType("boolean"); + + b.Property("IsLocked") + .HasColumnType("boolean"); + + b.Property("IsMovie") + .HasColumnType("boolean"); + + b.Property("IsRepeat") + .HasColumnType("boolean"); + + b.Property("IsSeries") + .HasColumnType("boolean"); + + b.Property("IsVirtualItem") + .HasColumnType("boolean"); + + b.Property("LUFS") + .HasColumnType("real"); + + b.Property("MediaType") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("NormalizationGain") + .HasColumnType("real"); + + b.Property("OfficialRating") + .HasColumnType("text"); + + b.Property("OriginalTitle") + .HasColumnType("text"); + + b.Property("Overview") + .HasColumnType("text"); + + b.Property("OwnerId") + .HasColumnType("text"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("ParentIndexNumber") + .HasColumnType("integer"); + + b.Property("Path") + .HasColumnType("text"); + + b.Property("PreferredMetadataCountryCode") + .HasColumnType("text"); + + b.Property("PreferredMetadataLanguage") + .HasColumnType("text"); + + b.Property("PremiereDate") + .HasColumnType("timestamp with time zone"); + + b.Property("PresentationUniqueKey") + .HasColumnType("text"); + + b.Property("PrimaryVersionId") + .HasColumnType("text"); + + b.Property("ProductionLocations") + .HasColumnType("text"); + + b.Property("ProductionYear") + .HasColumnType("integer"); + + b.Property("RunTimeTicks") + .HasColumnType("bigint"); + + b.Property("SeasonId") + .HasColumnType("uuid"); + + b.Property("SeasonName") + .HasColumnType("text"); + + b.Property("SeriesId") + .HasColumnType("uuid"); + + b.Property("SeriesName") + .HasColumnType("text"); + + b.Property("SeriesPresentationUniqueKey") + .HasColumnType("text"); + + b.Property("ShowId") + .HasColumnType("text"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("SortName") + .HasColumnType("text"); + + b.Property("StartDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Studios") + .HasColumnType("text"); + + b.Property("Tagline") + .HasColumnType("text"); + + b.Property("Tags") + .HasColumnType("text"); + + b.Property("TopParentId") + .HasColumnType("uuid"); + + b.Property("TotalBitrate") + .HasColumnType("integer"); + + b.Property("Type") + .IsRequired() + .HasColumnType("text"); + + b.Property("UnratedType") + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.HasIndex("Path"); + + b.HasIndex("PresentationUniqueKey"); + + b.HasIndex("TopParentId", "Id"); + + b.HasIndex("Type", "TopParentId", "Id"); + + b.HasIndex("Type", "TopParentId", "PresentationUniqueKey"); + + b.HasIndex("Type", "TopParentId", "StartDate"); + + b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem"); + + b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey"); + + b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem"); + + b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName"); + + b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); + + b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); + + b.ToTable("BaseItems"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Blurhash") + .HasColumnType("bytea"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("ImageType") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Path") + .IsRequired() + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemImageInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => + { + b.Property("Id") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.HasKey("Id", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemMetadataFields"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ProviderId") + .HasColumnType("text"); + + b.Property("ProviderValue") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("ItemId", "ProviderId"); + + b.HasIndex("ProviderId", "ProviderValue", "ItemId"); + + b.ToTable("BaseItemProviders"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => + { + b.Property("Id") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.HasKey("Id", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemTrailerTypes"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ChapterIndex") + .HasColumnType("integer"); + + b.Property("ImageDateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("ImagePath") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("StartPositionTicks") + .HasColumnType("bigint"); + + b.HasKey("ItemId", "ChapterIndex"); + + b.ToTable("Chapters"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Key") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemId", "Client", "Key") + .IsUnique(); + + b.ToTable("CustomItemDisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ChromecastVersion") + .HasColumnType("integer"); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DashboardTheme") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("EnableNextVideoInfoOverlay") + .HasColumnType("boolean"); + + b.Property("IndexBy") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("ScrollDirection") + .HasColumnType("integer"); + + b.Property("ShowBackdrop") + .HasColumnType("boolean"); + + b.Property("ShowSidebar") + .HasColumnType("boolean"); + + b.Property("SkipBackwardLength") + .HasColumnType("integer"); + + b.Property("SkipForwardLength") + .HasColumnType("integer"); + + b.Property("TvHome") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemId", "Client") + .IsUnique(); + + b.ToTable("DisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DisplayPreferencesId") + .HasColumnType("integer"); + + b.Property("Order") + .HasColumnType("integer"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DisplayPreferencesId"); + + b.ToTable("HomeSection"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("ImageInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("IndexBy") + .HasColumnType("integer"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("RememberIndexing") + .HasColumnType("boolean"); + + b.Property("RememberSorting") + .HasColumnType("boolean"); + + b.Property("SortBy") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("SortOrder") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("ViewType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("ItemDisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => + { + b.Property("ItemValueId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CleanValue") + .IsRequired() + .HasColumnType("text"); + + b.Property("Type") + .HasColumnType("integer"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("ItemValueId"); + + b.HasIndex("Type", "CleanValue") + .IsUnique(); + + b.ToTable("ItemValues"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => + { + b.Property("ItemValueId") + .HasColumnType("uuid"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.HasKey("ItemValueId", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("ItemValuesMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EndTicks") + .HasColumnType("bigint"); + + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("SegmentProviderId") + .IsRequired() + .HasColumnType("text"); + + b.Property("StartTicks") + .HasColumnType("bigint"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("MediaSegments"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("StreamIndex") + .HasColumnType("integer"); + + b.Property("AspectRatio") + .HasColumnType("text"); + + b.Property("AverageFrameRate") + .HasColumnType("real"); + + b.Property("BitDepth") + .HasColumnType("integer"); + + b.Property("BitRate") + .HasColumnType("integer"); + + b.Property("BlPresentFlag") + .HasColumnType("integer"); + + b.Property("ChannelLayout") + .HasColumnType("text"); + + b.Property("Channels") + .HasColumnType("integer"); + + b.Property("Codec") + .HasColumnType("text"); + + b.Property("CodecTag") + .HasColumnType("text"); + + b.Property("CodecTimeBase") + .HasColumnType("text"); + + b.Property("ColorPrimaries") + .HasColumnType("text"); + + b.Property("ColorSpace") + .HasColumnType("text"); + + b.Property("ColorTransfer") + .HasColumnType("text"); + + b.Property("Comment") + .HasColumnType("text"); + + b.Property("DvBlSignalCompatibilityId") + .HasColumnType("integer"); + + b.Property("DvLevel") + .HasColumnType("integer"); + + b.Property("DvProfile") + .HasColumnType("integer"); + + b.Property("DvVersionMajor") + .HasColumnType("integer"); + + b.Property("DvVersionMinor") + .HasColumnType("integer"); + + b.Property("ElPresentFlag") + .HasColumnType("integer"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("IsAnamorphic") + .HasColumnType("boolean"); + + b.Property("IsAvc") + .HasColumnType("boolean"); + + b.Property("IsDefault") + .HasColumnType("boolean"); + + b.Property("IsExternal") + .HasColumnType("boolean"); + + b.Property("IsForced") + .HasColumnType("boolean"); + + b.Property("IsHearingImpaired") + .HasColumnType("boolean"); + + b.Property("IsInterlaced") + .HasColumnType("boolean"); + + b.Property("KeyFrames") + .HasColumnType("text"); + + b.Property("Language") + .HasColumnType("text"); + + b.Property("Level") + .HasColumnType("real"); + + b.Property("NalLengthSize") + .HasColumnType("text"); + + b.Property("Path") + .HasColumnType("text"); + + b.Property("PixelFormat") + .HasColumnType("text"); + + b.Property("Profile") + .HasColumnType("text"); + + b.Property("RealFrameRate") + .HasColumnType("real"); + + b.Property("RefFrames") + .HasColumnType("integer"); + + b.Property("Rotation") + .HasColumnType("integer"); + + b.Property("RpuPresentFlag") + .HasColumnType("integer"); + + b.Property("SampleRate") + .HasColumnType("integer"); + + b.Property("StreamType") + .HasColumnType("integer"); + + b.Property("TimeBase") + .HasColumnType("text"); + + b.Property("Title") + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("integer"); + + b.HasKey("ItemId", "StreamIndex"); + + b.HasIndex("StreamIndex"); + + b.HasIndex("StreamType"); + + b.HasIndex("StreamIndex", "StreamType"); + + b.HasIndex("StreamIndex", "StreamType", "Language"); + + b.ToTable("MediaStreamInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.People", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("PersonType") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("Peoples"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("PeopleId") + .HasColumnType("uuid"); + + b.Property("ListOrder") + .HasColumnType("integer"); + + b.Property("Role") + .HasColumnType("text"); + + b.Property("SortOrder") + .HasColumnType("integer"); + + b.HasKey("ItemId", "PeopleId"); + + b.HasIndex("PeopleId"); + + b.HasIndex("ItemId", "ListOrder"); + + b.HasIndex("ItemId", "SortOrder"); + + b.ToTable("PeopleBaseItemMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Kind") + .HasColumnType("integer"); + + b.Property("Permission_Permissions_Guid") + .HasColumnType("uuid"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("Value") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Kind") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Permissions"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Kind") + .HasColumnType("integer"); + + b.Property("Preference_Preferences_Guid") + .HasColumnType("uuid"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(65535) + .HasColumnType("character varying(65535)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Kind") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Preferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastActivity") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("AccessToken") + .IsUnique(); + + b.ToTable("ApiKeys"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("text"); + + b.Property("AppName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("AppVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastActivity") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("DeviceId"); + + b.HasIndex("AccessToken", "DateLastActivity"); + + b.HasIndex("DeviceId", "DateLastActivity"); + + b.HasIndex("UserId", "DeviceId"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("CustomName") + .HasColumnType("text"); + + b.Property("DeviceId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.ToTable("DeviceOptions"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("Width") + .HasColumnType("integer"); + + b.Property("Bandwidth") + .HasColumnType("integer"); + + b.Property("Height") + .HasColumnType("integer"); + + b.Property("Interval") + .HasColumnType("integer"); + + b.Property("ThumbnailCount") + .HasColumnType("integer"); + + b.Property("TileHeight") + .HasColumnType("integer"); + + b.Property("TileWidth") + .HasColumnType("integer"); + + b.HasKey("ItemId", "Width"); + + b.ToTable("TrickplayInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AudioLanguagePreference") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("AuthenticationProviderId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("CastReceiverId") + .HasMaxLength(32) + .HasColumnType("character varying(32)"); + + b.Property("DisplayCollectionsView") + .HasColumnType("boolean"); + + b.Property("DisplayMissingEpisodes") + .HasColumnType("boolean"); + + b.Property("EnableAutoLogin") + .HasColumnType("boolean"); + + b.Property("EnableLocalPassword") + .HasColumnType("boolean"); + + b.Property("EnableNextEpisodeAutoPlay") + .HasColumnType("boolean"); + + b.Property("EnableUserPreferenceAccess") + .HasColumnType("boolean"); + + b.Property("HidePlayedInLatest") + .HasColumnType("boolean"); + + b.Property("InternalId") + .HasColumnType("bigint"); + + b.Property("InvalidLoginAttemptCount") + .HasColumnType("integer"); + + b.Property("LastActivityDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LastLoginDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LoginAttemptsBeforeLockout") + .HasColumnType("integer"); + + b.Property("MaxActiveSessions") + .HasColumnType("integer"); + + b.Property("MaxParentalAgeRating") + .HasColumnType("integer"); + + b.Property("MustUpdatePassword") + .HasColumnType("boolean"); + + b.Property("Password") + .HasMaxLength(65535) + .HasColumnType("character varying(65535)"); + + b.Property("PasswordResetProviderId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("PlayDefaultAudioTrack") + .HasColumnType("boolean"); + + b.Property("RememberAudioSelections") + .HasColumnType("boolean"); + + b.Property("RememberSubtitleSelections") + .HasColumnType("boolean"); + + b.Property("RemoteClientBitrateLimit") + .HasColumnType("integer"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("bigint"); + + b.Property("SubtitleLanguagePreference") + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("SubtitleMode") + .HasColumnType("integer"); + + b.Property("SyncPlayAccess") + .HasColumnType("integer"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .UseCollation("NOCASE"); + + b.HasKey("Id"); + + b.HasIndex("Username") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => + { + b.Property("ItemId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CustomDataKey") + .HasColumnType("text"); + + b.Property("AudioStreamIndex") + .HasColumnType("integer"); + + b.Property("IsFavorite") + .HasColumnType("boolean"); + + b.Property("LastPlayedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Likes") + .HasColumnType("boolean"); + + b.Property("PlayCount") + .HasColumnType("integer"); + + b.Property("PlaybackPositionTicks") + .HasColumnType("bigint"); + + b.Property("Played") + .HasColumnType("boolean"); + + b.Property("Rating") + .HasColumnType("double precision"); + + b.Property("SubtitleStreamIndex") + .HasColumnType("integer"); + + b.HasKey("ItemId", "UserId", "CustomDataKey"); + + b.HasIndex("UserId"); + + b.HasIndex("ItemId", "UserId", "IsFavorite"); + + b.HasIndex("ItemId", "UserId", "LastPlayedDate"); + + b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks"); + + b.HasIndex("ItemId", "UserId", "Played"); + + b.ToTable("UserData"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("AccessSchedules") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Children") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem") + .WithMany("ParentAncestors") + .HasForeignKey("ParentItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("ParentItem"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany() + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Images") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("LockedFields") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Provider") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("TrailerTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Chapters") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("DisplayPreferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => + { + b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null) + .WithMany("HomeSections") + .HasForeignKey("DisplayPreferencesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithOne("ProfileImage") + .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("ItemDisplayPreferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("ItemValues") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue") + .WithMany("BaseItemsMap") + .HasForeignKey("ItemValueId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("ItemValue"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("MediaStreams") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Peoples") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.People", "People") + .WithMany("BaseItems") + .HasForeignKey("PeopleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("People"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("Permissions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("Preferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => + { + b.HasOne("Jellyfin.Data.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("UserData") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => + { + b.Navigation("Chapters"); + + b.Navigation("Children"); + + b.Navigation("Images"); + + b.Navigation("ItemValues"); + + b.Navigation("LockedFields"); + + b.Navigation("MediaStreams"); + + b.Navigation("ParentAncestors"); + + b.Navigation("Peoples"); + + b.Navigation("Provider"); + + b.Navigation("TrailerTypes"); + + b.Navigation("UserData"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.Navigation("HomeSections"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => + { + b.Navigation("BaseItemsMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.People", b => + { + b.Navigation("BaseItems"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.User", b => + { + b.Navigation("AccessSchedules"); + + b.Navigation("DisplayPreferences"); + + b.Navigation("ItemDisplayPreferences"); + + b.Navigation("Permissions"); + + b.Navigation("Preferences"); + + b.Navigation("ProfileImage"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs new file mode 100644 index 0000000000..8f5e2e82b2 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs @@ -0,0 +1,26 @@ +using Jellyfin.Database.Providers.SqLite; +using Jellyfin.Server.Implementations; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Logging.Abstractions; + +namespace Jellyfin.Database.Providers.PgSql +{ + /// + /// The design time factory for . + /// This is only used for the creation of migrations and not during runtime. + /// + internal sealed class PgSqlDesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory + { + public JellyfinDbContext CreateDbContext(string[] args) + { + var optionsBuilder = new DbContextOptionsBuilder(); + optionsBuilder.UseNpgsql(f => f.MigrationsAssembly(GetType().Assembly)); + + return new JellyfinDbContext( + optionsBuilder.Options, + NullLogger.Instance, + new SqliteDatabaseProvider(null!, NullLogger.Instance)); + } + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs new file mode 100644 index 0000000000..1dae3401bc --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs @@ -0,0 +1,75 @@ +using System; +using Jellyfin.Server.Implementations; +using Jellyfin.Server.Implementations.DatabaseConfiguration; +using MediaBrowser.Common.Configuration; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using Npgsql; + +namespace Jellyfin.Database.Providers.PgSql; + +/// +/// Configures jellyfin to use an SqLite database. +/// +[JellyfinDatabaseProviderKey("Jellyfin-PgSql")] +public sealed class PgSqlDatabaseProvider : IJellyfinDatabaseProvider +{ + private readonly IConfigurationManager _configurationManager; + private readonly ILogger _logger; + + /// + /// Initializes a new instance of the class. + /// + /// Configuration manager to get PgSQL connection data. + /// A logger. + public PgSqlDatabaseProvider(IConfigurationManager configurationManager, ILogger logger) + { + _configurationManager = configurationManager; + _logger = logger; + } + + /// + public IDbContextFactory? DbContextFactory { get; set; } + + /// + public void Initialise(DbContextOptionsBuilder options) + { + var dbSettings = _configurationManager.GetConfiguration("database"); + + if (dbSettings.PostgreSql is null) + { + throw new InvalidOperationException("Selected PgSQL as database provider but did not provide required configuration. Please see docs."); + } + + var connectionBuilder = new NpgsqlConnectionStringBuilder(); + connectionBuilder.ApplicationName = "jellyfin"; + connectionBuilder.CommandTimeout = dbSettings.PostgreSql.Timeout; + connectionBuilder.Database = dbSettings.PostgreSql.DatabaseName; + connectionBuilder.Username = dbSettings.PostgreSql.Username; + connectionBuilder.Password = dbSettings.PostgreSql.Password; + connectionBuilder.Host = dbSettings.PostgreSql.ServerName; + connectionBuilder.Port = dbSettings.PostgreSql.Port; + + var connectionString = connectionBuilder.ToString(); + + options + .UseNpgsql(connectionString, pgSqlOptions => pgSqlOptions.MigrationsAssembly(GetType().Assembly)); + } + + /// + public Task RunScheduledOptimisation(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } + + /// + public void OnModelCreating(ModelBuilder modelBuilder) + { + } + + /// + public ValueTask DisposeAsync() + { + return ValueTask.CompletedTask; + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs similarity index 89% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs rename to Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs index fdd9a51361..11eeb8e02d 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/DesignTimeJellyfinDbFactory.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs @@ -9,7 +9,7 @@ namespace Jellyfin.Server.Implementations.Migrations /// The design time factory for . /// This is only used for the creation of migrations and not during runtime. /// - internal sealed class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory + internal sealed class SqliteDesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory { public JellyfinDbContext CreateDbContext(string[] args) { diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs index af2ede7010..d49d8536a3 100644 --- a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs +++ b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs @@ -11,4 +11,9 @@ public class DatabaseConfigurationOptions /// Gets or Sets the type of database jellyfin should use. /// public required string DatabaseType { get; set; } + + /// + /// Gets or Sets the settings to run jellyfin with Postgres. + /// + public PostgreSqlOptions? PostgreSql { get; set; } } diff --git a/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs b/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs new file mode 100644 index 0000000000..1f7c30b098 --- /dev/null +++ b/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs @@ -0,0 +1,39 @@ +using System; + +namespace Jellyfin.Server.Implementations.DatabaseConfiguration; + +/// +/// Options specific to run jellyfin on a postgreSql database. +/// +public class PostgreSqlOptions +{ + /// + /// Gets or Sets the Port. Defaults to 5432. + /// + public required int Port { get; set; } = 5432; + + /// + /// Gets or Sets the Server name. + /// + public required string ServerName { get; set; } + + /// + /// Gets or Sets the username. + /// + public required string Username { get; set; } + + /// + /// Gets or Sets the password. + /// + public required string Password { get; set; } + + /// + /// Gets or Sets the database name. Defaults to "Jellyfin". + /// + public string DatabaseName { get; set; } = "Jellyfin"; + + /// + /// Gets or Sets the timeout in secounds before a running command is terminated. Defaults to 30. + /// + public int Timeout { get; set; } = 30; +} From ce00bc076e9a97197e7e7e83276013518ce84ec5 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 18:21:47 +0000 Subject: [PATCH 05/34] Fixed postgres sql provider --- .devcontainer/devcontainer.json | 20 ++++--------------- .../DatabaseConfigurationOptions.cs | 0 .../DbConfiguration/PostgreSqlOptions.cs | 0 .../Jellyfin.Database.Providers.PgSql.csproj | 1 - .../PgSqlDesignTimeJellyfinDbFactory.cs | 3 +-- .../Extensions/ServiceCollectionExtensions.cs | 3 +++ .../Jellyfin.Server.Implementations.csproj | 1 + 7 files changed, 9 insertions(+), 19 deletions(-) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/DbConfiguration/DatabaseConfigurationOptions.cs (100%) rename {Jellyfin.Server.Implementations => Jellyfin.Database/Jellyfin.Database.Implementations}/DbConfiguration/PostgreSqlOptions.cs (100%) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bcf484463b..84c1dda971 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Development Jellyfin Server", - "image":"mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", + "image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", // restores nuget packages, installs the dotnet workloads and installs the dev https certificate "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", // reads the extensions list and installs them @@ -13,7 +13,9 @@ }, "ghcr.io/devcontainers-contrib/features/apt-packages:1": { "preserve_apt_list": false, - "packages": ["libfontconfig1"] + "packages": [ + "libfontconfig1" + ] }, "ghcr.io/devcontainers/features/docker-in-docker:2": { "dockerDashComposeVersion": "v2" @@ -24,19 +26,5 @@ "hostRequirements": { "memory": "8gb", "cpus": 4 - }, "remoteEnv": { - "JELLYFIN_DATA_DIR": "/config" - }, - "mounts": [ - "source=/opt/docker/data/jellyfin/testConfig/,target=/config,type=bind,consistency=cached", - "source=/opt/docker/data/jellyfin/config10.9.11/metadata,target=/config/metadata,type=bind,consistency=cached", - "source=/mnt/video,target=/media,type=bind,consistency=cached" - ], - "customizations": { - "vscode": { - "extensions": [ - "alexcvzz.vscode-sqlite" - ] - } } } diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs similarity index 100% rename from Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs diff --git a/Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs similarity index 100% rename from Jellyfin.Server.Implementations/DbConfiguration/PostgreSqlOptions.cs rename to Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj index ae1497403b..785a3c63ab 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj @@ -45,7 +45,6 @@ - diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs index 8f5e2e82b2..bf949d570b 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs @@ -1,4 +1,3 @@ -using Jellyfin.Database.Providers.SqLite; using Jellyfin.Server.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; @@ -20,7 +19,7 @@ namespace Jellyfin.Database.Providers.PgSql return new JellyfinDbContext( optionsBuilder.Options, NullLogger.Instance, - new SqliteDatabaseProvider(null!, NullLogger.Instance)); + new PgSqlDatabaseProvider(null!, NullLogger.Instance)); } } } diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 091ecee987..7936c6fd98 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using Jellyfin.Database.Providers.PgSql; using Jellyfin.Database.Providers.SqLite; using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; @@ -22,6 +23,7 @@ public static class ServiceCollectionExtensions private static IEnumerable DatabaseProviderTypes() { yield return typeof(SqliteDatabaseProvider); + yield return typeof(PgSqlDatabaseProvider); } private static IDictionary GetSupportedDbProviders() @@ -75,6 +77,7 @@ public static class ServiceCollectionExtensions { DatabaseType = "Jellyfin-SqLite", }; + configurationManager.SaveConfiguration("database", efCoreConfiguration); } } diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index b566b3489b..01d9dcf64d 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -37,6 +37,7 @@ + From 4ce0d498abe1c52f92805a2cb04cbcfe3218817e Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 18:32:36 +0000 Subject: [PATCH 06/34] Added pgsql devcontainer --- .devcontainer/pgsql/Dockerfile | 8 ++++ .devcontainer/pgsql/devcontainer.json | 44 +++++++++++++++++++++ .devcontainer/pgsql/docker-compose.yaml | 51 +++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 .devcontainer/pgsql/Dockerfile create mode 100644 .devcontainer/pgsql/devcontainer.json create mode 100644 .devcontainer/pgsql/docker-compose.yaml diff --git a/.devcontainer/pgsql/Dockerfile b/.devcontainer/pgsql/Dockerfile new file mode 100644 index 0000000000..800bec76f8 --- /dev/null +++ b/.devcontainer/pgsql/Dockerfile @@ -0,0 +1,8 @@ +FROM mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/pgsql/devcontainer.json b/.devcontainer/pgsql/devcontainer.json new file mode 100644 index 0000000000..db7f84c89c --- /dev/null +++ b/.devcontainer/pgsql/devcontainer.json @@ -0,0 +1,44 @@ +{ + "name": "Development Jellyfin Server", + "image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", + "dockerComposeFile": "docker-compose.yml", + // restores nuget packages, installs the dotnet workloads and installs the dev https certificate + "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", + // reads the extensions list and installs them + "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", + "forwardPorts": ["pgadmin:8081"], + "portsAttributes": { + "8081": { + "label": "pgAdmin", + "onAutoForward": "notify", + "requireLocalPort": true + }, + "8096": { + "label": "jellyfinapi", + "onAutoForward": "notify", + "requireLocalPort": true + } + }, + "features": { + "ghcr.io/devcontainers/features/dotnet:2": { + "version": "none", + "dotnetRuntimeVersions": "9.0", + "aspNetCoreRuntimeVersions": "9.0" + }, + "ghcr.io/devcontainers-contrib/features/apt-packages:1": { + "preserve_apt_list": false, + "packages": [ + "libfontconfig1" + ] + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "dockerDashComposeVersion": "v2" + }, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {} + }, + "hostRequirements": { + "memory": "8gb", + "cpus": 4 + } +} diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml new file mode 100644 index 0000000000..88954d5644 --- /dev/null +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -0,0 +1,51 @@ +version: '3.8' + +services: + app: + build: + context: . + dockerfile: Dockerfile + + volumes: + - ../..:/workspaces:cached + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. + network_mode: service:pgadmin + + # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + # user: root + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + + db: + image: postgres:14.3 + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: jellyfin + POSTGRES_USER: password + POSTGRES_DB: Jellyfin + pgadmin: + image: dpage/pgadmin4 + restart: unless-stopped + volumes: + - ./pgadmin:/pgadmin + - pgadmin-data:/var/lib/pgadmin + environment: + - PGADMIN_DEFAULT_EMAIL=user@domain.com + - PGADMIN_DEFAULT_PASSWORD=SuperSecret + - PGADMIN_LISTEN_PORT=8081 + - PGADMIN_SERVER_JSON_FILE=/pgadmin/servers.json + - PGADMIN_CONFIG_SERVER_MODE=False + + # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + +volumes: + postgres-data: + pgadmin-data: From 74858042fce56eeb7af5cf991569fee0dca50775 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 19:14:11 +0000 Subject: [PATCH 07/34] Added devcontainer for pgsql development --- .devcontainer/devcontainer.json | 2 ++ .devcontainer/pgsql/Dockerfile | 2 +- .devcontainer/pgsql/devcontainer.json | 5 +++-- .devcontainer/pgsql/docker-compose.yaml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 84c1dda971..bcdd82cb9a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,8 @@ { "name": "Development Jellyfin Server", "image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // restores nuget packages, installs the dotnet workloads and installs the dev https certificate "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", // reads the extensions list and installs them diff --git a/.devcontainer/pgsql/Dockerfile b/.devcontainer/pgsql/Dockerfile index 800bec76f8..ff7f3bcd79 100644 --- a/.devcontainer/pgsql/Dockerfile +++ b/.devcontainer/pgsql/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm +FROM mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ diff --git a/.devcontainer/pgsql/devcontainer.json b/.devcontainer/pgsql/devcontainer.json index db7f84c89c..7fb09fdc9c 100644 --- a/.devcontainer/pgsql/devcontainer.json +++ b/.devcontainer/pgsql/devcontainer.json @@ -1,7 +1,8 @@ { "name": "Development Jellyfin Server", - "image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", - "dockerComposeFile": "docker-compose.yml", + "dockerComposeFile": "docker-compose.yaml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // restores nuget packages, installs the dotnet workloads and installs the dev https certificate "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", // reads the extensions list and installs them diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml index 88954d5644..891a03673f 100644 --- a/.devcontainer/pgsql/docker-compose.yaml +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -7,7 +7,7 @@ services: dockerfile: Dockerfile volumes: - - ../..:/workspaces:cached + - ../../..:/workspaces:cached # Overrides default command so things don't shut down after the process ends. command: sleep infinity From d07e1a13b315fe6ebccf5c89cacf1c8a94b13a5f Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 27 Jan 2025 20:55:39 +0000 Subject: [PATCH 08/34] Fixed collation settings --- .devcontainer/pgsql/docker-compose.yaml | 4 ++-- .../Migrations/20250127174201_InitMigration.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml index 891a03673f..1cab707622 100644 --- a/.devcontainer/pgsql/docker-compose.yaml +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -22,13 +22,13 @@ services: # (Adding the "ports" property to this file will not forward from a Codespace.) db: - image: postgres:14.3 + image: postgres:17.2 restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: jellyfin - POSTGRES_USER: password + POSTGRES_USER: jellyfin POSTGRES_DB: Jellyfin pgadmin: image: dpage/pgadmin4 diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs index f1d0d15647..01ddd5ec96 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs @@ -12,6 +12,9 @@ namespace Jellyfin.Database.Providers.PgSql.Migrations /// protected override void Up(MigrationBuilder migrationBuilder) { + // shim NOCASE collation with an undefined locale and case-insensitive matching rules. + migrationBuilder.Sql("CREATE COLLATION NOCASE (provider = icu, locale = 'und-x-icu.utf8', deterministic = false)"); + migrationBuilder.CreateTable( name: "ActivityLogs", columns: table => new From 379a104cfbeaf3c3db5988865aa2db67875a76f1 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 29 Jan 2025 20:17:50 +0000 Subject: [PATCH 09/34] Changed UserName to non-deterministic field --- .devcontainer/pgsql/docker-compose.yaml | 3 +-- Jellyfin.Api/Controllers/UserController.cs | 2 +- .../ModelConfiguration/UserConfiguration.cs | 3 +-- .../Migrations/20250127174201_InitMigration.cs | 5 +---- Jellyfin.Server.Implementations/Users/UserManager.cs | 10 ++++++++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml index 1cab707622..7aa56dd0df 100644 --- a/.devcontainer/pgsql/docker-compose.yaml +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -25,7 +25,7 @@ services: image: postgres:17.2 restart: unless-stopped volumes: - - postgres-data:/var/lib/postgresql/data + - ./pgdata/var/lib/postgresql/data environment: POSTGRES_PASSWORD: jellyfin POSTGRES_USER: jellyfin @@ -47,5 +47,4 @@ services: # (Adding the "ports" property to this file will not forward from a Codespace.) volumes: - postgres-data: pgadmin-data: diff --git a/Jellyfin.Api/Controllers/UserController.cs b/Jellyfin.Api/Controllers/UserController.cs index 838578fab8..88e5d46adc 100644 --- a/Jellyfin.Api/Controllers/UserController.cs +++ b/Jellyfin.Api/Controllers/UserController.cs @@ -390,7 +390,7 @@ public class UserController : BaseJellyfinApiController return StatusCode(StatusCodes.Status403Forbidden, "User update not allowed."); } - if (!string.Equals(user.Username, updateUser.Name, StringComparison.Ordinal)) + if (!string.Equals(user.Username, updateUser.Name, StringComparison.OrdinalIgnoreCase)) { await _userManager.RenameUser(user, updateUser.Name).ConfigureAwait(false); } diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs index a369cf6562..bcaa3634ed 100644 --- a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs @@ -13,8 +13,7 @@ namespace Jellyfin.Server.Implementations.ModelConfiguration public void Configure(EntityTypeBuilder builder) { builder - .Property(user => user.Username) - .UseCollation("NOCASE"); + .Property(user => user.Username); builder .HasOne(u => u.ProfileImage) diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs index 01ddd5ec96..ac9ce3be57 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs @@ -12,9 +12,6 @@ namespace Jellyfin.Database.Providers.PgSql.Migrations /// protected override void Up(MigrationBuilder migrationBuilder) { - // shim NOCASE collation with an undefined locale and case-insensitive matching rules. - migrationBuilder.Sql("CREATE COLLATION NOCASE (provider = icu, locale = 'und-x-icu.utf8', deterministic = false)"); - migrationBuilder.CreateTable( name: "ActivityLogs", columns: table => new @@ -230,7 +227,7 @@ namespace Jellyfin.Database.Providers.PgSql.Migrations columns: table => new { Id = table.Column(type: "uuid", nullable: false), - Username = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, collation: "NOCASE"), + Username = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), Password = table.Column(type: "character varying(65535)", maxLength: 65535, nullable: true), MustUpdatePassword = table.Column(type: "boolean", nullable: false), AudioLanguagePreference = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index 44de11b661..1939122eb0 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -147,7 +147,7 @@ namespace Jellyfin.Server.Implementations.Users ThrowIfInvalidUsername(newName); - if (user.Username.Equals(newName, StringComparison.Ordinal)) + if (user.Username.Equals(newName, StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException("The new and old names must be different."); } @@ -155,8 +155,11 @@ namespace Jellyfin.Server.Implementations.Users var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false); await using (dbContext.ConfigureAwait(false)) { +#pragma warning disable CA1862 // Use the 'StringComparison' method overloads to perform case-insensitive string comparisons +#pragma warning disable CA1311 // Specify a culture or use an invariant version to avoid implicit dependency on current culture +#pragma warning disable CA1304 // The behavior of 'string.ToUpper()' could vary based on the current user's locale settings if (await dbContext.Users - .AnyAsync(u => u.Username == newName && !u.Id.Equals(user.Id)) + .AnyAsync(u => u.Username.ToUpper() == newName.ToUpper() && !u.Id.Equals(user.Id)) .ConfigureAwait(false)) { throw new ArgumentException(string.Format( @@ -164,6 +167,9 @@ namespace Jellyfin.Server.Implementations.Users "A user with the name '{0}' already exists.", newName)); } +#pragma warning restore CA1304 // The behavior of 'string.ToUpper()' could vary based on the current user's locale settings +#pragma warning restore CA1311 // Specify a culture or use an invariant version to avoid implicit dependency on current culture +#pragma warning restore CA1862 // Use the 'StringComparison' method overloads to perform case-insensitive string comparisons user.Username = newName; await UpdateUserInternalAsync(dbContext, user).ConfigureAwait(false); From ebe89c07b39702a3b8205d2070d95a5f79d3b1d2 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 2 Feb 2025 02:07:04 +0000 Subject: [PATCH 10/34] Fixed collation and pgsql container --- .devcontainer/pgsql/docker-compose.yaml | 2 +- .../Migrations/20250127174201_InitMigration.cs | 6 ++++-- .../Migrations/JellyfinDbContextModelSnapshot.cs | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml index 7aa56dd0df..dda6deda69 100644 --- a/.devcontainer/pgsql/docker-compose.yaml +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -25,7 +25,7 @@ services: image: postgres:17.2 restart: unless-stopped volumes: - - ./pgdata/var/lib/postgresql/data + - ./pgdata:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: jellyfin POSTGRES_USER: jellyfin diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs index ac9ce3be57..ad1d28b136 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs @@ -964,19 +964,21 @@ namespace Jellyfin.Database.Providers.PgSql.Migrations table: "Peoples", column: "Name"); + // this was edited manually because "UserId" is a reserved name in pgsql migrationBuilder.CreateIndex( name: "IX_Permissions_UserId_Kind", table: "Permissions", columns: new[] { "UserId", "Kind" }, unique: true, - filter: "[UserId] IS NOT NULL"); + filter: "\"Permissions\".\"UserId\" IS NOT NULL"); + // this was edited manually because "UserId" is a reserved name in pgsql migrationBuilder.CreateIndex( name: "IX_Preferences_UserId_Kind", table: "Preferences", columns: new[] { "UserId", "Kind" }, unique: true, - filter: "[UserId] IS NOT NULL"); + filter: "\"Preferences\".\"UserId\" IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_UserData_ItemId_UserId_IsFavorite", diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs index cdaf257d4d..2d0c783be5 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs @@ -1273,8 +1273,7 @@ namespace Jellyfin.Database.Providers.PgSql.Migrations b.Property("Username") .IsRequired() .HasMaxLength(255) - .HasColumnType("character varying(255)") - .UseCollation("NOCASE"); + .HasColumnType("character varying(255)"); b.HasKey("Id"); From 4b57f2bdbba74093daf79dbf54b397baafba4512 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 2 Feb 2025 02:10:14 +0000 Subject: [PATCH 11/34] Fixed whitespace formatting --- .devcontainer/devcontainer.json | 2 +- .devcontainer/pgsql/devcontainer.json | 28 +++++++++++++------------ .devcontainer/pgsql/docker-compose.yaml | 2 -- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bcdd82cb9a..c2127ba5c3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ "name": "Development Jellyfin Server", "image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm", "service": "app", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // restores nuget packages, installs the dotnet workloads and installs the dev https certificate "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", // reads the extensions list and installs them diff --git a/.devcontainer/pgsql/devcontainer.json b/.devcontainer/pgsql/devcontainer.json index 7fb09fdc9c..3dd91d9755 100644 --- a/.devcontainer/pgsql/devcontainer.json +++ b/.devcontainer/pgsql/devcontainer.json @@ -2,24 +2,26 @@ "name": "Development Jellyfin Server", "dockerComposeFile": "docker-compose.yaml", "service": "app", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // restores nuget packages, installs the dotnet workloads and installs the dev https certificate "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", // reads the extensions list and installs them "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", - "forwardPorts": ["pgadmin:8081"], - "portsAttributes": { - "8081": { - "label": "pgAdmin", - "onAutoForward": "notify", - "requireLocalPort": true - }, + "forwardPorts": [ + "pgadmin:8081" + ], + "portsAttributes": { + "8081": { + "label": "pgAdmin", + "onAutoForward": "notify", + "requireLocalPort": true + }, "8096": { - "label": "jellyfinapi", - "onAutoForward": "notify", - "requireLocalPort": true - } - }, + "label": "jellyfinapi", + "onAutoForward": "notify", + "requireLocalPort": true + } + }, "features": { "ghcr.io/devcontainers/features/dotnet:2": { "version": "none", diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml index dda6deda69..45af0b33e1 100644 --- a/.devcontainer/pgsql/docker-compose.yaml +++ b/.devcontainer/pgsql/docker-compose.yaml @@ -14,7 +14,6 @@ services: # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. network_mode: service:pgadmin - # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. # user: root @@ -42,7 +41,6 @@ services: - PGADMIN_LISTEN_PORT=8081 - PGADMIN_SERVER_JSON_FILE=/pgadmin/servers.json - PGADMIN_CONFIG_SERVER_MODE=False - # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. # (Adding the "ports" property to this file will not forward from a Codespace.) From 2e5ff6842af11c4e8ba70a6df83e1676ba1bb5e0 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 2 Feb 2025 02:13:37 +0000 Subject: [PATCH 12/34] Added collation migration in SqLite --- .../20250202021306_FixedCollation.Designer.cs | 1594 +++++++++++++++++ .../20250202021306_FixedCollation.cs | 40 + .../Migrations/JellyfinDbModelSnapshot.cs | 5 +- 3 files changed, 1636 insertions(+), 3 deletions(-) create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs new file mode 100644 index 0000000000..d7b806d7a3 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs @@ -0,0 +1,1594 @@ +// +using System; +using Jellyfin.Server.Implementations; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Jellyfin.Server.Implementations.Migrations +{ + [DbContext(typeof(JellyfinDbContext))] + [Migration("20250202021306_FixedCollation")] + partial class FixedCollation + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "9.0.1"); + + modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DayOfWeek") + .HasColumnType("INTEGER"); + + b.Property("EndHour") + .HasColumnType("REAL"); + + b.Property("StartHour") + .HasColumnType("REAL"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AccessSchedules"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreated") + .HasColumnType("TEXT"); + + b.Property("ItemId") + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("LogSeverity") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("TEXT"); + + b.Property("Overview") + .HasMaxLength(512) + .HasColumnType("TEXT"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.Property("ShortOverview") + .HasMaxLength(512) + .HasColumnType("TEXT"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DateCreated"); + + b.ToTable("ActivityLogs"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("ParentItemId") + .HasColumnType("TEXT"); + + b.HasKey("ItemId", "ParentItemId"); + + b.HasIndex("ParentItemId"); + + b.ToTable("AncestorIds"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("Codec") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CodecTag") + .HasColumnType("TEXT"); + + b.Property("Comment") + .HasColumnType("TEXT"); + + b.Property("Filename") + .HasColumnType("TEXT"); + + b.Property("MimeType") + .HasColumnType("TEXT"); + + b.HasKey("ItemId", "Index"); + + b.ToTable("AttachmentStreamInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Album") + .HasColumnType("TEXT"); + + b.Property("AlbumArtists") + .HasColumnType("TEXT"); + + b.Property("Artists") + .HasColumnType("TEXT"); + + b.Property("Audio") + .HasColumnType("INTEGER"); + + b.Property("ChannelId") + .HasColumnType("TEXT"); + + b.Property("CleanName") + .HasColumnType("TEXT"); + + b.Property("CommunityRating") + .HasColumnType("REAL"); + + b.Property("CriticRating") + .HasColumnType("REAL"); + + b.Property("CustomRating") + .HasColumnType("TEXT"); + + b.Property("Data") + .HasColumnType("TEXT"); + + b.Property("DateCreated") + .HasColumnType("TEXT"); + + b.Property("DateLastMediaAdded") + .HasColumnType("TEXT"); + + b.Property("DateLastRefreshed") + .HasColumnType("TEXT"); + + b.Property("DateLastSaved") + .HasColumnType("TEXT"); + + b.Property("DateModified") + .HasColumnType("TEXT"); + + b.Property("EndDate") + .HasColumnType("TEXT"); + + b.Property("EpisodeTitle") + .HasColumnType("TEXT"); + + b.Property("ExternalId") + .HasColumnType("TEXT"); + + b.Property("ExternalSeriesId") + .HasColumnType("TEXT"); + + b.Property("ExternalServiceId") + .HasColumnType("TEXT"); + + b.Property("ExtraIds") + .HasColumnType("TEXT"); + + b.Property("ExtraType") + .HasColumnType("INTEGER"); + + b.Property("ForcedSortName") + .HasColumnType("TEXT"); + + b.Property("Genres") + .HasColumnType("TEXT"); + + b.Property("Height") + .HasColumnType("INTEGER"); + + b.Property("IndexNumber") + .HasColumnType("INTEGER"); + + b.Property("InheritedParentalRatingValue") + .HasColumnType("INTEGER"); + + b.Property("IsFolder") + .HasColumnType("INTEGER"); + + b.Property("IsInMixedFolder") + .HasColumnType("INTEGER"); + + b.Property("IsLocked") + .HasColumnType("INTEGER"); + + b.Property("IsMovie") + .HasColumnType("INTEGER"); + + b.Property("IsRepeat") + .HasColumnType("INTEGER"); + + b.Property("IsSeries") + .HasColumnType("INTEGER"); + + b.Property("IsVirtualItem") + .HasColumnType("INTEGER"); + + b.Property("LUFS") + .HasColumnType("REAL"); + + b.Property("MediaType") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("NormalizationGain") + .HasColumnType("REAL"); + + b.Property("OfficialRating") + .HasColumnType("TEXT"); + + b.Property("OriginalTitle") + .HasColumnType("TEXT"); + + b.Property("Overview") + .HasColumnType("TEXT"); + + b.Property("OwnerId") + .HasColumnType("TEXT"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("ParentIndexNumber") + .HasColumnType("INTEGER"); + + b.Property("Path") + .HasColumnType("TEXT"); + + b.Property("PreferredMetadataCountryCode") + .HasColumnType("TEXT"); + + b.Property("PreferredMetadataLanguage") + .HasColumnType("TEXT"); + + b.Property("PremiereDate") + .HasColumnType("TEXT"); + + b.Property("PresentationUniqueKey") + .HasColumnType("TEXT"); + + b.Property("PrimaryVersionId") + .HasColumnType("TEXT"); + + b.Property("ProductionLocations") + .HasColumnType("TEXT"); + + b.Property("ProductionYear") + .HasColumnType("INTEGER"); + + b.Property("RunTimeTicks") + .HasColumnType("INTEGER"); + + b.Property("SeasonId") + .HasColumnType("TEXT"); + + b.Property("SeasonName") + .HasColumnType("TEXT"); + + b.Property("SeriesId") + .HasColumnType("TEXT"); + + b.Property("SeriesName") + .HasColumnType("TEXT"); + + b.Property("SeriesPresentationUniqueKey") + .HasColumnType("TEXT"); + + b.Property("ShowId") + .HasColumnType("TEXT"); + + b.Property("Size") + .HasColumnType("INTEGER"); + + b.Property("SortName") + .HasColumnType("TEXT"); + + b.Property("StartDate") + .HasColumnType("TEXT"); + + b.Property("Studios") + .HasColumnType("TEXT"); + + b.Property("Tagline") + .HasColumnType("TEXT"); + + b.Property("Tags") + .HasColumnType("TEXT"); + + b.Property("TopParentId") + .HasColumnType("TEXT"); + + b.Property("TotalBitrate") + .HasColumnType("INTEGER"); + + b.Property("Type") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UnratedType") + .HasColumnType("TEXT"); + + b.Property("Width") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.HasIndex("Path"); + + b.HasIndex("PresentationUniqueKey"); + + b.HasIndex("TopParentId", "Id"); + + b.HasIndex("Type", "TopParentId", "Id"); + + b.HasIndex("Type", "TopParentId", "PresentationUniqueKey"); + + b.HasIndex("Type", "TopParentId", "StartDate"); + + b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem"); + + b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey"); + + b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem"); + + b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName"); + + b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); + + b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); + + b.ToTable("BaseItems"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Blurhash") + .HasColumnType("BLOB"); + + b.Property("DateModified") + .HasColumnType("TEXT"); + + b.Property("Height") + .HasColumnType("INTEGER"); + + b.Property("ImageType") + .HasColumnType("INTEGER"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("Path") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Width") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemImageInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => + { + b.Property("Id") + .HasColumnType("INTEGER"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.HasKey("Id", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemMetadataFields"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("ProviderId") + .HasColumnType("TEXT"); + + b.Property("ProviderValue") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ItemId", "ProviderId"); + + b.HasIndex("ProviderId", "ProviderValue", "ItemId"); + + b.ToTable("BaseItemProviders"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => + { + b.Property("Id") + .HasColumnType("INTEGER"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.HasKey("Id", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("BaseItemTrailerTypes"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("ChapterIndex") + .HasColumnType("INTEGER"); + + b.Property("ImageDateModified") + .HasColumnType("TEXT"); + + b.Property("ImagePath") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("StartPositionTicks") + .HasColumnType("INTEGER"); + + b.HasKey("ItemId", "ChapterIndex"); + + b.ToTable("Chapters"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("Key") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemId", "Client", "Key") + .IsUnique(); + + b.ToTable("CustomItemDisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ChromecastVersion") + .HasColumnType("INTEGER"); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DashboardTheme") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("EnableNextVideoInfoOverlay") + .HasColumnType("INTEGER"); + + b.Property("IndexBy") + .HasColumnType("INTEGER"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("ScrollDirection") + .HasColumnType("INTEGER"); + + b.Property("ShowBackdrop") + .HasColumnType("INTEGER"); + + b.Property("ShowSidebar") + .HasColumnType("INTEGER"); + + b.Property("SkipBackwardLength") + .HasColumnType("INTEGER"); + + b.Property("SkipForwardLength") + .HasColumnType("INTEGER"); + + b.Property("TvHome") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "ItemId", "Client") + .IsUnique(); + + b.ToTable("DisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DisplayPreferencesId") + .HasColumnType("INTEGER"); + + b.Property("Order") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("DisplayPreferencesId"); + + b.ToTable("HomeSection"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("LastModified") + .HasColumnType("TEXT"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("ImageInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Client") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("IndexBy") + .HasColumnType("INTEGER"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("RememberIndexing") + .HasColumnType("INTEGER"); + + b.Property("RememberSorting") + .HasColumnType("INTEGER"); + + b.Property("SortBy") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("SortOrder") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("ViewType") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("ItemDisplayPreferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => + { + b.Property("ItemValueId") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CleanValue") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.Property("Value") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ItemValueId"); + + b.HasIndex("Type", "CleanValue") + .IsUnique(); + + b.ToTable("ItemValues"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => + { + b.Property("ItemValueId") + .HasColumnType("TEXT"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.HasKey("ItemValueId", "ItemId"); + + b.HasIndex("ItemId"); + + b.ToTable("ItemValuesMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("EndTicks") + .HasColumnType("INTEGER"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("SegmentProviderId") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("StartTicks") + .HasColumnType("INTEGER"); + + b.Property("Type") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("MediaSegments"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("StreamIndex") + .HasColumnType("INTEGER"); + + b.Property("AspectRatio") + .HasColumnType("TEXT"); + + b.Property("AverageFrameRate") + .HasColumnType("REAL"); + + b.Property("BitDepth") + .HasColumnType("INTEGER"); + + b.Property("BitRate") + .HasColumnType("INTEGER"); + + b.Property("BlPresentFlag") + .HasColumnType("INTEGER"); + + b.Property("ChannelLayout") + .HasColumnType("TEXT"); + + b.Property("Channels") + .HasColumnType("INTEGER"); + + b.Property("Codec") + .HasColumnType("TEXT"); + + b.Property("CodecTag") + .HasColumnType("TEXT"); + + b.Property("CodecTimeBase") + .HasColumnType("TEXT"); + + b.Property("ColorPrimaries") + .HasColumnType("TEXT"); + + b.Property("ColorSpace") + .HasColumnType("TEXT"); + + b.Property("ColorTransfer") + .HasColumnType("TEXT"); + + b.Property("Comment") + .HasColumnType("TEXT"); + + b.Property("DvBlSignalCompatibilityId") + .HasColumnType("INTEGER"); + + b.Property("DvLevel") + .HasColumnType("INTEGER"); + + b.Property("DvProfile") + .HasColumnType("INTEGER"); + + b.Property("DvVersionMajor") + .HasColumnType("INTEGER"); + + b.Property("DvVersionMinor") + .HasColumnType("INTEGER"); + + b.Property("ElPresentFlag") + .HasColumnType("INTEGER"); + + b.Property("Height") + .HasColumnType("INTEGER"); + + b.Property("IsAnamorphic") + .HasColumnType("INTEGER"); + + b.Property("IsAvc") + .HasColumnType("INTEGER"); + + b.Property("IsDefault") + .HasColumnType("INTEGER"); + + b.Property("IsExternal") + .HasColumnType("INTEGER"); + + b.Property("IsForced") + .HasColumnType("INTEGER"); + + b.Property("IsHearingImpaired") + .HasColumnType("INTEGER"); + + b.Property("IsInterlaced") + .HasColumnType("INTEGER"); + + b.Property("KeyFrames") + .HasColumnType("TEXT"); + + b.Property("Language") + .HasColumnType("TEXT"); + + b.Property("Level") + .HasColumnType("REAL"); + + b.Property("NalLengthSize") + .HasColumnType("TEXT"); + + b.Property("Path") + .HasColumnType("TEXT"); + + b.Property("PixelFormat") + .HasColumnType("TEXT"); + + b.Property("Profile") + .HasColumnType("TEXT"); + + b.Property("RealFrameRate") + .HasColumnType("REAL"); + + b.Property("RefFrames") + .HasColumnType("INTEGER"); + + b.Property("Rotation") + .HasColumnType("INTEGER"); + + b.Property("RpuPresentFlag") + .HasColumnType("INTEGER"); + + b.Property("SampleRate") + .HasColumnType("INTEGER"); + + b.Property("StreamType") + .HasColumnType("INTEGER"); + + b.Property("TimeBase") + .HasColumnType("TEXT"); + + b.Property("Title") + .HasColumnType("TEXT"); + + b.Property("Width") + .HasColumnType("INTEGER"); + + b.HasKey("ItemId", "StreamIndex"); + + b.HasIndex("StreamIndex"); + + b.HasIndex("StreamType"); + + b.HasIndex("StreamIndex", "StreamType"); + + b.HasIndex("StreamIndex", "StreamType", "Language"); + + b.ToTable("MediaStreamInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.People", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("PersonType") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("Peoples"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("PeopleId") + .HasColumnType("TEXT"); + + b.Property("ListOrder") + .HasColumnType("INTEGER"); + + b.Property("Role") + .HasColumnType("TEXT"); + + b.Property("SortOrder") + .HasColumnType("INTEGER"); + + b.HasKey("ItemId", "PeopleId"); + + b.HasIndex("PeopleId"); + + b.HasIndex("ItemId", "ListOrder"); + + b.HasIndex("ItemId", "SortOrder"); + + b.ToTable("PeopleBaseItemMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Kind") + .HasColumnType("INTEGER"); + + b.Property("Permission_Permissions_Guid") + .HasColumnType("TEXT"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Kind") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Permissions"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Kind") + .HasColumnType("INTEGER"); + + b.Property("Preference_Preferences_Guid") + .HasColumnType("TEXT"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(65535) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Kind") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Preferences"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DateCreated") + .HasColumnType("TEXT"); + + b.Property("DateLastActivity") + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("AccessToken") + .IsUnique(); + + b.ToTable("ApiKeys"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("AppName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("AppVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DateCreated") + .HasColumnType("TEXT"); + + b.Property("DateLastActivity") + .HasColumnType("TEXT"); + + b.Property("DateModified") + .HasColumnType("TEXT"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("IsActive") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DeviceId"); + + b.HasIndex("AccessToken", "DateLastActivity"); + + b.HasIndex("DeviceId", "DateLastActivity"); + + b.HasIndex("UserId", "DeviceId"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CustomName") + .HasColumnType("TEXT"); + + b.Property("DeviceId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.ToTable("DeviceOptions"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("Width") + .HasColumnType("INTEGER"); + + b.Property("Bandwidth") + .HasColumnType("INTEGER"); + + b.Property("Height") + .HasColumnType("INTEGER"); + + b.Property("Interval") + .HasColumnType("INTEGER"); + + b.Property("ThumbnailCount") + .HasColumnType("INTEGER"); + + b.Property("TileHeight") + .HasColumnType("INTEGER"); + + b.Property("TileWidth") + .HasColumnType("INTEGER"); + + b.HasKey("ItemId", "Width"); + + b.ToTable("TrickplayInfos"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AudioLanguagePreference") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("AuthenticationProviderId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CastReceiverId") + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("DisplayCollectionsView") + .HasColumnType("INTEGER"); + + b.Property("DisplayMissingEpisodes") + .HasColumnType("INTEGER"); + + b.Property("EnableAutoLogin") + .HasColumnType("INTEGER"); + + b.Property("EnableLocalPassword") + .HasColumnType("INTEGER"); + + b.Property("EnableNextEpisodeAutoPlay") + .HasColumnType("INTEGER"); + + b.Property("EnableUserPreferenceAccess") + .HasColumnType("INTEGER"); + + b.Property("HidePlayedInLatest") + .HasColumnType("INTEGER"); + + b.Property("InternalId") + .HasColumnType("INTEGER"); + + b.Property("InvalidLoginAttemptCount") + .HasColumnType("INTEGER"); + + b.Property("LastActivityDate") + .HasColumnType("TEXT"); + + b.Property("LastLoginDate") + .HasColumnType("TEXT"); + + b.Property("LoginAttemptsBeforeLockout") + .HasColumnType("INTEGER"); + + b.Property("MaxActiveSessions") + .HasColumnType("INTEGER"); + + b.Property("MaxParentalAgeRating") + .HasColumnType("INTEGER"); + + b.Property("MustUpdatePassword") + .HasColumnType("INTEGER"); + + b.Property("Password") + .HasMaxLength(65535) + .HasColumnType("TEXT"); + + b.Property("PasswordResetProviderId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("PlayDefaultAudioTrack") + .HasColumnType("INTEGER"); + + b.Property("RememberAudioSelections") + .HasColumnType("INTEGER"); + + b.Property("RememberSubtitleSelections") + .HasColumnType("INTEGER"); + + b.Property("RemoteClientBitrateLimit") + .HasColumnType("INTEGER"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .HasColumnType("INTEGER"); + + b.Property("SubtitleLanguagePreference") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("SubtitleMode") + .HasColumnType("INTEGER"); + + b.Property("SyncPlayAccess") + .HasColumnType("INTEGER"); + + b.Property("Username") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("Username") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => + { + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("CustomDataKey") + .HasColumnType("TEXT"); + + b.Property("AudioStreamIndex") + .HasColumnType("INTEGER"); + + b.Property("IsFavorite") + .HasColumnType("INTEGER"); + + b.Property("LastPlayedDate") + .HasColumnType("TEXT"); + + b.Property("Likes") + .HasColumnType("INTEGER"); + + b.Property("PlayCount") + .HasColumnType("INTEGER"); + + b.Property("PlaybackPositionTicks") + .HasColumnType("INTEGER"); + + b.Property("Played") + .HasColumnType("INTEGER"); + + b.Property("Rating") + .HasColumnType("REAL"); + + b.Property("SubtitleStreamIndex") + .HasColumnType("INTEGER"); + + b.HasKey("ItemId", "UserId", "CustomDataKey"); + + b.HasIndex("UserId"); + + b.HasIndex("ItemId", "UserId", "IsFavorite"); + + b.HasIndex("ItemId", "UserId", "LastPlayedDate"); + + b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks"); + + b.HasIndex("ItemId", "UserId", "Played"); + + b.ToTable("UserData"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("AccessSchedules") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Children") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem") + .WithMany("ParentAncestors") + .HasForeignKey("ParentItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("ParentItem"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany() + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Images") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("LockedFields") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Provider") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("TrailerTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Chapters") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("DisplayPreferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => + { + b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null) + .WithMany("HomeSections") + .HasForeignKey("DisplayPreferencesId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithOne("ProfileImage") + .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("ItemDisplayPreferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("ItemValues") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue") + .WithMany("BaseItemsMap") + .HasForeignKey("ItemValueId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("ItemValue"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("MediaStreams") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("Peoples") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.People", "People") + .WithMany("BaseItems") + .HasForeignKey("PeopleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("People"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("Permissions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => + { + b.HasOne("Jellyfin.Data.Entities.User", null) + .WithMany("Preferences") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => + { + b.HasOne("Jellyfin.Data.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => + { + b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") + .WithMany("UserData") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jellyfin.Data.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Item"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => + { + b.Navigation("Chapters"); + + b.Navigation("Children"); + + b.Navigation("Images"); + + b.Navigation("ItemValues"); + + b.Navigation("LockedFields"); + + b.Navigation("MediaStreams"); + + b.Navigation("ParentAncestors"); + + b.Navigation("Peoples"); + + b.Navigation("Provider"); + + b.Navigation("TrailerTypes"); + + b.Navigation("UserData"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => + { + b.Navigation("HomeSections"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => + { + b.Navigation("BaseItemsMap"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.People", b => + { + b.Navigation("BaseItems"); + }); + + modelBuilder.Entity("Jellyfin.Data.Entities.User", b => + { + b.Navigation("AccessSchedules"); + + b.Navigation("DisplayPreferences"); + + b.Navigation("ItemDisplayPreferences"); + + b.Navigation("Permissions"); + + b.Navigation("Preferences"); + + b.Navigation("ProfileImage"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs new file mode 100644 index 0000000000..e82575e418 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Jellyfin.Server.Implementations.Migrations +{ + /// + public partial class FixedCollation : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Username", + table: "Users", + type: "TEXT", + maxLength: 255, + nullable: false, + oldClrType: typeof(string), + oldType: "TEXT", + oldMaxLength: 255, + oldCollation: "NOCASE"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Username", + table: "Users", + type: "TEXT", + maxLength: 255, + nullable: false, + collation: "NOCASE", + oldClrType: typeof(string), + oldType: "TEXT", + oldMaxLength: 255); + } + } +} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs index e75760d805..ddcc37195d 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs @@ -15,7 +15,7 @@ namespace Jellyfin.Server.Implementations.Migrations protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.10"); + modelBuilder.HasAnnotation("ProductVersion", "9.0.1"); modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => { @@ -1244,8 +1244,7 @@ namespace Jellyfin.Server.Implementations.Migrations b.Property("Username") .IsRequired() .HasMaxLength(255) - .HasColumnType("TEXT") - .UseCollation("NOCASE"); + .HasColumnType("TEXT"); b.HasKey("Id"); From 61b2ad7f496b6e47ed3646636f57d96916ffbf33 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 2 Feb 2025 02:21:34 +0000 Subject: [PATCH 13/34] Added missing assembly info and fixed migration tests --- .../Properties/AssemblyInfo.cs | 23 ++++++++++++++++++ .../Jellyfin.Database.Providers.SqLite.csproj | 4 ++++ .../Properties/AssemblyInfo.cs | 23 ++++++++++++++++++ .../EfMigrations/EfMigrationTests.cs | 24 +++++++++++++------ ...llyfin.Server.Implementations.Tests.csproj | 3 +++ 5 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs create mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..27022c7de8 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs @@ -0,0 +1,23 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Jellyfin.Database.Providers.PgSql")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Jellyfin Project")] +[assembly: AssemblyProduct("Jellyfin Server")] +[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] +[assembly: InternalsVisibleTo("Jellyfin.Server.Implementations.Tests")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj index e77c944f95..fca872d902 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj @@ -48,4 +48,8 @@ + + + + diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..8d6920f2e8 --- /dev/null +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs @@ -0,0 +1,23 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Jellyfin.Database.Providers.SqLite")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Jellyfin Project")] +[assembly: AssemblyProduct("Jellyfin Server")] +[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] +[assembly: InternalsVisibleTo("Jellyfin.Server.Implementations.Tests")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs index 54d5d2adf8..ab388eca86 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs @@ -1,5 +1,7 @@ using System; using System.Threading.Tasks; +using Jellyfin.Database.Providers.PgSql; +using Jellyfin.Server.Implementations.Migrations; using Microsoft.EntityFrameworkCore; using Xunit; @@ -7,11 +9,19 @@ namespace Jellyfin.Server.Implementations.Tests.EfMigrations; public class EfMigrationTests { - // [Fact] - // public void CheckForUnappliedMigrations() - // { - // var dbDesignContext = new DesignTimeJellyfinDbFactory(); - // var context = dbDesignContext.CreateDbContext([]); - // Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration."); - // } + [Fact] + public void CheckForUnappliedMigrations_PgSQL() + { + var dbDesignContext = new PgSqlDesignTimeJellyfinDbFactory(); + var context = dbDesignContext.CreateDbContext([]); + Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model for PgSQL. Please create a Migration."); + } + + [Fact] + public void CheckForUnappliedMigrations_SqLite() + { + var dbDesignContext = new SqliteDesignTimeJellyfinDbFactory(); + var context = dbDesignContext.CreateDbContext([]); + Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model for PgSQL. Please create a Migration."); + } } diff --git a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj index 4f018ba694..84a3951f67 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj +++ b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj @@ -29,6 +29,9 @@ + + + From efb402b1d27ca3f3444f7b81553ced804029bb3f Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 2 Feb 2025 02:32:28 +0000 Subject: [PATCH 14/34] Fixed shutdown behavior --- .../IJellyfinDatabaseProvider.cs | 9 ++++++++- .../PgSqlDatabaseProvider.cs | 4 ++-- .../SqliteDatabaseProvider.cs | 6 +++--- Jellyfin.Server/Program.cs | 6 ++++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs index 72a6f819e0..b27a88971d 100644 --- a/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -8,7 +8,7 @@ namespace Jellyfin.Server.Implementations; /// /// Defines the type and extension points for multi database support. /// -public interface IJellyfinDatabaseProvider : IAsyncDisposable +public interface IJellyfinDatabaseProvider { /// /// Gets or Sets the Database Factory when initialisaition is done. @@ -33,4 +33,11 @@ public interface IJellyfinDatabaseProvider : IAsyncDisposable /// The token to abort the operation. /// A representing the asynchronous operation. Task RunScheduledOptimisation(CancellationToken cancellationToken); + + /// + /// If supported this should perform any actions that are required on stopping the jellyfin server. + /// + /// The token that will be used to abort the operation. + /// A representing the asynchronous operation. + Task RunShutdownTask(CancellationToken cancellationToken); } diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs index 1dae3401bc..e6ae2acea7 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs @@ -68,8 +68,8 @@ public sealed class PgSqlDatabaseProvider : IJellyfinDatabaseProvider } /// - public ValueTask DisposeAsync() + public Task RunShutdownTask(CancellationToken cancellationToken) { - return ValueTask.CompletedTask; + return Task.CompletedTask; } } diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs index 8ef5b6af5e..907ea91561 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs @@ -64,13 +64,13 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider } /// - public async ValueTask DisposeAsync() + public async Task RunShutdownTask(CancellationToken cancellationToken) { // Run before disposing the application - var context = await DbContextFactory!.CreateDbContextAsync().ConfigureAwait(false); + var context = await DbContextFactory!.CreateDbContextAsync(cancellationToken).ConfigureAwait(false); await using (context.ConfigureAwait(false)) { - await context.Database.ExecuteSqlRawAsync("PRAGMA optimize").ConfigureAwait(false); + await context.Database.ExecuteSqlRawAsync("PRAGMA optimize", cancellationToken).ConfigureAwait(false); } SqliteConnection.ClearAllPools(); diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index fd23b7e25c..bb93ef1385 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; +using System.Threading; using System.Threading.Tasks; using CommandLine; using Emby.Server.Implementations; @@ -197,8 +198,9 @@ namespace Jellyfin.Server _logger.LogInformation("Running query planner optimizations in the database... This might take a while"); var databaseProvider = appHost.ServiceProvider.GetRequiredService(); - - await databaseProvider.DisposeAsync().ConfigureAwait(false); + var shutdownSource = new CancellationTokenSource(); + shutdownSource.CancelAfter((int)TimeSpan.FromSeconds(60).TotalMicroseconds); + await databaseProvider.RunShutdownTask(shutdownSource.Token).ConfigureAwait(false); } host?.Dispose(); From c9237ae73149bc8c8d18d94557b4927deb06175b Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 3 Feb 2025 20:15:36 +0000 Subject: [PATCH 15/34] Applied review suggestions --- .../PgSqlDatabaseProvider.cs | 2 +- .../SqliteDatabaseProvider.cs | 4 ++-- Jellyfin.Database/readme.md | 4 ++-- .../Extensions/ServiceCollectionExtensions.cs | 4 ++-- .../EfMigrations/EfMigrationTests.cs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs index e6ae2acea7..021110742e 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs @@ -9,7 +9,7 @@ using Npgsql; namespace Jellyfin.Database.Providers.PgSql; /// -/// Configures jellyfin to use an SqLite database. +/// Configures jellyfin to use an Postgres database. /// [JellyfinDatabaseProviderKey("Jellyfin-PgSql")] public sealed class PgSqlDatabaseProvider : IJellyfinDatabaseProvider diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs index 907ea91561..ef4f00384b 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs @@ -8,9 +8,9 @@ using Microsoft.Extensions.Logging; namespace Jellyfin.Database.Providers.SqLite; /// -/// Configures jellyfin to use an SqLite database. +/// Configures jellyfin to use an SQLite database. /// -[JellyfinDatabaseProviderKey("Jellyfin-SqLite")] +[JellyfinDatabaseProviderKey("Jellyfin-SQLite")] public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider { private readonly IApplicationPaths _applicationPaths; diff --git a/Jellyfin.Database/readme.md b/Jellyfin.Database/readme.md index 883aff2d75..55d57d3eff 100644 --- a/Jellyfin.Database/readme.md +++ b/Jellyfin.Database/readme.md @@ -12,12 +12,12 @@ When creating a new migration, you always have to create migrations for all prov dotnet ef migrations add MIGRATION_NAME --project "PATH_TO_PROJECT" -- --provider PROVIDER_KEY ``` -with both sqlite and pgsql currently beeing supported and both need migrations, you need to run the efcore tool with the correct project to tell EfCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. +with both sqlite and pgsql currently beeing supported and both need migrations, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin` ```cmd -dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SqLite +dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SQLite dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.PgSql" -- --migration-provider Jellyfin-PgSql ``` diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 7936c6fd98..730e628df2 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -72,10 +72,10 @@ public static class ServiceCollectionExtensions } else { - // when nothing is setup via new Database configuration, fallback to SqLite with default settings. + // when nothing is setup via new Database configuration, fallback to SQLite with default settings. efCoreConfiguration = new DatabaseConfigurationOptions() { - DatabaseType = "Jellyfin-SqLite", + DatabaseType = "Jellyfin-SQLite", }; configurationManager.SaveConfiguration("database", efCoreConfiguration); } diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs index ab388eca86..78e431be14 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs @@ -14,7 +14,7 @@ public class EfMigrationTests { var dbDesignContext = new PgSqlDesignTimeJellyfinDbFactory(); var context = dbDesignContext.CreateDbContext([]); - Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model for PgSQL. Please create a Migration."); + Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EFCore model for PgSQL. Please create a Migration."); } [Fact] @@ -22,6 +22,6 @@ public class EfMigrationTests { var dbDesignContext = new SqliteDesignTimeJellyfinDbFactory(); var context = dbDesignContext.CreateDbContext([]); - Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model for PgSQL. Please create a Migration."); + Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EFCore model for SQLite. Please create a Migration."); } } From df8f352d6543755d4cdc5e8c168c3032600f85cb Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 3 Feb 2025 20:16:58 +0000 Subject: [PATCH 16/34] Made key lookup case insensitive --- .../Extensions/ServiceCollectionExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 730e628df2..1dd7cfe045 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -38,7 +38,7 @@ public static class ServiceCollectionExtensions } var provider = providerType; - items[keyAttribute.DatabaseProviderKey] = (services) => (IJellyfinDatabaseProvider)ActivatorUtilities.CreateInstance(services, providerType); + items[keyAttribute.DatabaseProviderKey.ToUpperInvariant()] = (services) => (IJellyfinDatabaseProvider)ActivatorUtilities.CreateInstance(services, providerType); } return items; @@ -81,7 +81,7 @@ public static class ServiceCollectionExtensions } } - if (!providers.TryGetValue(efCoreConfiguration.DatabaseType, out providerFactory!)) + if (!providers.TryGetValue(efCoreConfiguration.DatabaseType.ToUpperInvariant(), out providerFactory!)) { throw new InvalidOperationException($"Jellyfin cannot find the database provider of type '{efCoreConfiguration.DatabaseType}'. Supported types are {string.Join(", ", providers.Keys)}"); } From 078587d232ccbfdf6e08c6f1a6435e4e397e4bdc Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 3 Feb 2025 20:20:37 +0000 Subject: [PATCH 17/34] Added Version string to application name connection for pgsql --- .../PgSqlDatabaseProvider.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs index 021110742e..ccaf38d2ac 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs +++ b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs @@ -1,4 +1,6 @@ using System; +using System.Diagnostics; +using System.Reflection; using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; @@ -42,7 +44,7 @@ public sealed class PgSqlDatabaseProvider : IJellyfinDatabaseProvider } var connectionBuilder = new NpgsqlConnectionStringBuilder(); - connectionBuilder.ApplicationName = "jellyfin"; + connectionBuilder.ApplicationName = $"jellyfin+{FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly()!.Location).FileVersion}"; connectionBuilder.CommandTimeout = dbSettings.PostgreSql.Timeout; connectionBuilder.Database = dbSettings.PostgreSql.DatabaseName; connectionBuilder.Username = dbSettings.PostgreSql.Username; From 8b07c1f53ddf491499005b9e0da9cf1bbe93cf9a Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 19 Feb 2025 15:38:32 +0000 Subject: [PATCH 18/34] Fixed gitignore for pgsql data --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d5a0367bff..fe312b647c 100644 --- a/.gitignore +++ b/.gitignore @@ -277,3 +277,5 @@ apiclient/generated # Omnisharp crash logs mono_crash.*.json + +.devcontainer/pgsql/pgdata \ No newline at end of file From ddc20b74bf2eddd686c14c084260ca457011f8be Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 19 Feb 2025 18:21:23 +0000 Subject: [PATCH 19/34] Removed pgsql from refactor --- .../Jellyfin.Database.Providers.PgSql.csproj | 50 - .../20250127174201_InitMigration.Designer.cs | 1624 ----------------- .../20250127174201_InitMigration.cs | 1106 ----------- ...83152_MakeStartEndDateNullable.Designer.cs | 1623 ---------------- ...20250205183152_MakeStartEndDateNullable.cs | 55 - .../JellyfinDbContextModelSnapshot.cs | 1620 ---------------- .../PgSqlDesignTimeJellyfinDbFactory.cs | 25 - .../PgSqlDatabaseProvider.cs | 77 - .../Properties/AssemblyInfo.cs | 23 - .../Extensions/ServiceCollectionExtensions.cs | 4 - Jellyfin.sln | 9 +- .../EfMigrations/EfMigrationTests.cs | 11 - 12 files changed, 1 insertion(+), 6226 deletions(-) delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.Designer.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj deleted file mode 100644 index 785a3c63ab..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Jellyfin.Database.Providers.PgSql.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - net9.0 - enable - enable - false - true - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs deleted file mode 100644 index 47fff07214..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.Designer.cs +++ /dev/null @@ -1,1624 +0,0 @@ -// -using System; -using Jellyfin.Server.Implementations; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace Jellyfin.Database.Providers.PgSql.Migrations -{ - [DbContext(typeof(JellyfinDbContext))] - [Migration("20250127174201_InitMigration")] - partial class InitMigration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DayOfWeek") - .HasColumnType("integer"); - - b.Property("EndHour") - .HasColumnType("double precision"); - - b.Property("StartHour") - .HasColumnType("double precision"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AccessSchedules"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("ItemId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LogSeverity") - .HasColumnType("integer"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Overview") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("ShortOverview") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("DateCreated"); - - b.ToTable("ActivityLogs"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ParentItemId") - .HasColumnType("uuid"); - - b.HasKey("ItemId", "ParentItemId"); - - b.HasIndex("ParentItemId"); - - b.ToTable("AncestorIds"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Index") - .HasColumnType("integer"); - - b.Property("Codec") - .IsRequired() - .HasColumnType("text"); - - b.Property("CodecTag") - .HasColumnType("text"); - - b.Property("Comment") - .HasColumnType("text"); - - b.Property("Filename") - .HasColumnType("text"); - - b.Property("MimeType") - .HasColumnType("text"); - - b.HasKey("ItemId", "Index"); - - b.ToTable("AttachmentStreamInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Album") - .HasColumnType("text"); - - b.Property("AlbumArtists") - .HasColumnType("text"); - - b.Property("Artists") - .HasColumnType("text"); - - b.Property("Audio") - .HasColumnType("integer"); - - b.Property("ChannelId") - .HasColumnType("text"); - - b.Property("CleanName") - .HasColumnType("text"); - - b.Property("CommunityRating") - .HasColumnType("real"); - - b.Property("CriticRating") - .HasColumnType("real"); - - b.Property("CustomRating") - .HasColumnType("text"); - - b.Property("Data") - .HasColumnType("text"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastMediaAdded") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastRefreshed") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastSaved") - .HasColumnType("timestamp with time zone"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("EpisodeTitle") - .HasColumnType("text"); - - b.Property("ExternalId") - .HasColumnType("text"); - - b.Property("ExternalSeriesId") - .HasColumnType("text"); - - b.Property("ExternalServiceId") - .HasColumnType("text"); - - b.Property("ExtraIds") - .HasColumnType("text"); - - b.Property("ExtraType") - .HasColumnType("integer"); - - b.Property("ForcedSortName") - .HasColumnType("text"); - - b.Property("Genres") - .HasColumnType("text"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("IndexNumber") - .HasColumnType("integer"); - - b.Property("InheritedParentalRatingValue") - .HasColumnType("integer"); - - b.Property("IsFolder") - .HasColumnType("boolean"); - - b.Property("IsInMixedFolder") - .HasColumnType("boolean"); - - b.Property("IsLocked") - .HasColumnType("boolean"); - - b.Property("IsMovie") - .HasColumnType("boolean"); - - b.Property("IsRepeat") - .HasColumnType("boolean"); - - b.Property("IsSeries") - .HasColumnType("boolean"); - - b.Property("IsVirtualItem") - .HasColumnType("boolean"); - - b.Property("LUFS") - .HasColumnType("real"); - - b.Property("MediaType") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("NormalizationGain") - .HasColumnType("real"); - - b.Property("OfficialRating") - .HasColumnType("text"); - - b.Property("OriginalTitle") - .HasColumnType("text"); - - b.Property("Overview") - .HasColumnType("text"); - - b.Property("OwnerId") - .HasColumnType("text"); - - b.Property("ParentId") - .HasColumnType("uuid"); - - b.Property("ParentIndexNumber") - .HasColumnType("integer"); - - b.Property("Path") - .HasColumnType("text"); - - b.Property("PreferredMetadataCountryCode") - .HasColumnType("text"); - - b.Property("PreferredMetadataLanguage") - .HasColumnType("text"); - - b.Property("PremiereDate") - .HasColumnType("timestamp with time zone"); - - b.Property("PresentationUniqueKey") - .HasColumnType("text"); - - b.Property("PrimaryVersionId") - .HasColumnType("text"); - - b.Property("ProductionLocations") - .HasColumnType("text"); - - b.Property("ProductionYear") - .HasColumnType("integer"); - - b.Property("RunTimeTicks") - .HasColumnType("bigint"); - - b.Property("SeasonId") - .HasColumnType("uuid"); - - b.Property("SeasonName") - .HasColumnType("text"); - - b.Property("SeriesId") - .HasColumnType("uuid"); - - b.Property("SeriesName") - .HasColumnType("text"); - - b.Property("SeriesPresentationUniqueKey") - .HasColumnType("text"); - - b.Property("ShowId") - .HasColumnType("text"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("SortName") - .HasColumnType("text"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Studios") - .HasColumnType("text"); - - b.Property("Tagline") - .HasColumnType("text"); - - b.Property("Tags") - .HasColumnType("text"); - - b.Property("TopParentId") - .HasColumnType("uuid"); - - b.Property("TotalBitrate") - .HasColumnType("integer"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text"); - - b.Property("UnratedType") - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("Path"); - - b.HasIndex("PresentationUniqueKey"); - - b.HasIndex("TopParentId", "Id"); - - b.HasIndex("Type", "TopParentId", "Id"); - - b.HasIndex("Type", "TopParentId", "PresentationUniqueKey"); - - b.HasIndex("Type", "TopParentId", "StartDate"); - - b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem"); - - b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey"); - - b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem"); - - b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName"); - - b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); - - b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); - - b.ToTable("BaseItems"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Blurhash") - .HasColumnType("bytea"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("ImageType") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Path") - .IsRequired() - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemImageInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => - { - b.Property("Id") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("Id", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemMetadataFields"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ProviderId") - .HasColumnType("text"); - - b.Property("ProviderValue") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("ItemId", "ProviderId"); - - b.HasIndex("ProviderId", "ProviderValue", "ItemId"); - - b.ToTable("BaseItemProviders"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => - { - b.Property("Id") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("Id", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemTrailerTypes"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ChapterIndex") - .HasColumnType("integer"); - - b.Property("ImageDateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("ImagePath") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("StartPositionTicks") - .HasColumnType("bigint"); - - b.HasKey("ItemId", "ChapterIndex"); - - b.ToTable("Chapters"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Key") - .IsRequired() - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemId", "Client", "Key") - .IsUnique(); - - b.ToTable("CustomItemDisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChromecastVersion") - .HasColumnType("integer"); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DashboardTheme") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("EnableNextVideoInfoOverlay") - .HasColumnType("boolean"); - - b.Property("IndexBy") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ScrollDirection") - .HasColumnType("integer"); - - b.Property("ShowBackdrop") - .HasColumnType("boolean"); - - b.Property("ShowSidebar") - .HasColumnType("boolean"); - - b.Property("SkipBackwardLength") - .HasColumnType("integer"); - - b.Property("SkipForwardLength") - .HasColumnType("integer"); - - b.Property("TvHome") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemId", "Client") - .IsUnique(); - - b.ToTable("DisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DisplayPreferencesId") - .HasColumnType("integer"); - - b.Property("Order") - .HasColumnType("integer"); - - b.Property("Type") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("DisplayPreferencesId"); - - b.ToTable("HomeSection"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("LastModified") - .HasColumnType("timestamp with time zone"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("ImageInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("IndexBy") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("RememberIndexing") - .HasColumnType("boolean"); - - b.Property("RememberSorting") - .HasColumnType("boolean"); - - b.Property("SortBy") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("ViewType") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("ItemDisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => - { - b.Property("ItemValueId") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CleanValue") - .IsRequired() - .HasColumnType("text"); - - b.Property("Type") - .HasColumnType("integer"); - - b.Property("Value") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("ItemValueId"); - - b.HasIndex("Type", "CleanValue") - .IsUnique(); - - b.ToTable("ItemValues"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => - { - b.Property("ItemValueId") - .HasColumnType("uuid"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("ItemValueId", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("ItemValuesMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("EndTicks") - .HasColumnType("bigint"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("SegmentProviderId") - .IsRequired() - .HasColumnType("text"); - - b.Property("StartTicks") - .HasColumnType("bigint"); - - b.Property("Type") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.ToTable("MediaSegments"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("StreamIndex") - .HasColumnType("integer"); - - b.Property("AspectRatio") - .HasColumnType("text"); - - b.Property("AverageFrameRate") - .HasColumnType("real"); - - b.Property("BitDepth") - .HasColumnType("integer"); - - b.Property("BitRate") - .HasColumnType("integer"); - - b.Property("BlPresentFlag") - .HasColumnType("integer"); - - b.Property("ChannelLayout") - .HasColumnType("text"); - - b.Property("Channels") - .HasColumnType("integer"); - - b.Property("Codec") - .HasColumnType("text"); - - b.Property("CodecTag") - .HasColumnType("text"); - - b.Property("CodecTimeBase") - .HasColumnType("text"); - - b.Property("ColorPrimaries") - .HasColumnType("text"); - - b.Property("ColorSpace") - .HasColumnType("text"); - - b.Property("ColorTransfer") - .HasColumnType("text"); - - b.Property("Comment") - .HasColumnType("text"); - - b.Property("DvBlSignalCompatibilityId") - .HasColumnType("integer"); - - b.Property("DvLevel") - .HasColumnType("integer"); - - b.Property("DvProfile") - .HasColumnType("integer"); - - b.Property("DvVersionMajor") - .HasColumnType("integer"); - - b.Property("DvVersionMinor") - .HasColumnType("integer"); - - b.Property("ElPresentFlag") - .HasColumnType("integer"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("IsAnamorphic") - .HasColumnType("boolean"); - - b.Property("IsAvc") - .HasColumnType("boolean"); - - b.Property("IsDefault") - .HasColumnType("boolean"); - - b.Property("IsExternal") - .HasColumnType("boolean"); - - b.Property("IsForced") - .HasColumnType("boolean"); - - b.Property("IsHearingImpaired") - .HasColumnType("boolean"); - - b.Property("IsInterlaced") - .HasColumnType("boolean"); - - b.Property("KeyFrames") - .HasColumnType("text"); - - b.Property("Language") - .HasColumnType("text"); - - b.Property("Level") - .HasColumnType("real"); - - b.Property("NalLengthSize") - .HasColumnType("text"); - - b.Property("Path") - .HasColumnType("text"); - - b.Property("PixelFormat") - .HasColumnType("text"); - - b.Property("Profile") - .HasColumnType("text"); - - b.Property("RealFrameRate") - .HasColumnType("real"); - - b.Property("RefFrames") - .HasColumnType("integer"); - - b.Property("Rotation") - .HasColumnType("integer"); - - b.Property("RpuPresentFlag") - .HasColumnType("integer"); - - b.Property("SampleRate") - .HasColumnType("integer"); - - b.Property("StreamType") - .HasColumnType("integer"); - - b.Property("TimeBase") - .HasColumnType("text"); - - b.Property("Title") - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("ItemId", "StreamIndex"); - - b.HasIndex("StreamIndex"); - - b.HasIndex("StreamType"); - - b.HasIndex("StreamIndex", "StreamType"); - - b.HasIndex("StreamIndex", "StreamType", "Language"); - - b.ToTable("MediaStreamInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.People", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("PersonType") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("Peoples"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("PeopleId") - .HasColumnType("uuid"); - - b.Property("ListOrder") - .HasColumnType("integer"); - - b.Property("Role") - .HasColumnType("text"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.HasKey("ItemId", "PeopleId"); - - b.HasIndex("PeopleId"); - - b.HasIndex("ItemId", "ListOrder"); - - b.HasIndex("ItemId", "SortOrder"); - - b.ToTable("PeopleBaseItemMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Kind") - .HasColumnType("integer"); - - b.Property("Permission_Permissions_Guid") - .HasColumnType("uuid"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "Kind") - .IsUnique() - .HasFilter("[UserId] IS NOT NULL"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Kind") - .HasColumnType("integer"); - - b.Property("Preference_Preferences_Guid") - .HasColumnType("uuid"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(65535) - .HasColumnType("character varying(65535)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "Kind") - .IsUnique() - .HasFilter("[UserId] IS NOT NULL"); - - b.ToTable("Preferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AccessToken") - .IsRequired() - .HasColumnType("text"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastActivity") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("AccessToken") - .IsUnique(); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AccessToken") - .IsRequired() - .HasColumnType("text"); - - b.Property("AppName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("AppVersion") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastActivity") - .HasColumnType("timestamp with time zone"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("IsActive") - .HasColumnType("boolean"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("DeviceId"); - - b.HasIndex("AccessToken", "DateLastActivity"); - - b.HasIndex("DeviceId", "DateLastActivity"); - - b.HasIndex("UserId", "DeviceId"); - - b.ToTable("Devices"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CustomName") - .HasColumnType("text"); - - b.Property("DeviceId") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("DeviceId") - .IsUnique(); - - b.ToTable("DeviceOptions"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Width") - .HasColumnType("integer"); - - b.Property("Bandwidth") - .HasColumnType("integer"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("Interval") - .HasColumnType("integer"); - - b.Property("ThumbnailCount") - .HasColumnType("integer"); - - b.Property("TileHeight") - .HasColumnType("integer"); - - b.Property("TileWidth") - .HasColumnType("integer"); - - b.HasKey("ItemId", "Width"); - - b.ToTable("TrickplayInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AudioLanguagePreference") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("AuthenticationProviderId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("CastReceiverId") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DisplayCollectionsView") - .HasColumnType("boolean"); - - b.Property("DisplayMissingEpisodes") - .HasColumnType("boolean"); - - b.Property("EnableAutoLogin") - .HasColumnType("boolean"); - - b.Property("EnableLocalPassword") - .HasColumnType("boolean"); - - b.Property("EnableNextEpisodeAutoPlay") - .HasColumnType("boolean"); - - b.Property("EnableUserPreferenceAccess") - .HasColumnType("boolean"); - - b.Property("HidePlayedInLatest") - .HasColumnType("boolean"); - - b.Property("InternalId") - .HasColumnType("bigint"); - - b.Property("InvalidLoginAttemptCount") - .HasColumnType("integer"); - - b.Property("LastActivityDate") - .HasColumnType("timestamp with time zone"); - - b.Property("LastLoginDate") - .HasColumnType("timestamp with time zone"); - - b.Property("LoginAttemptsBeforeLockout") - .HasColumnType("integer"); - - b.Property("MaxActiveSessions") - .HasColumnType("integer"); - - b.Property("MaxParentalAgeRating") - .HasColumnType("integer"); - - b.Property("MustUpdatePassword") - .HasColumnType("boolean"); - - b.Property("Password") - .HasMaxLength(65535) - .HasColumnType("character varying(65535)"); - - b.Property("PasswordResetProviderId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("PlayDefaultAudioTrack") - .HasColumnType("boolean"); - - b.Property("RememberAudioSelections") - .HasColumnType("boolean"); - - b.Property("RememberSubtitleSelections") - .HasColumnType("boolean"); - - b.Property("RemoteClientBitrateLimit") - .HasColumnType("integer"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("SubtitleLanguagePreference") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("SubtitleMode") - .HasColumnType("integer"); - - b.Property("SyncPlayAccess") - .HasColumnType("integer"); - - b.Property("Username") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)") - .UseCollation("NOCASE"); - - b.HasKey("Id"); - - b.HasIndex("Username") - .IsUnique(); - - b.ToTable("Users"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("CustomDataKey") - .HasColumnType("text"); - - b.Property("AudioStreamIndex") - .HasColumnType("integer"); - - b.Property("IsFavorite") - .HasColumnType("boolean"); - - b.Property("LastPlayedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Likes") - .HasColumnType("boolean"); - - b.Property("PlayCount") - .HasColumnType("integer"); - - b.Property("PlaybackPositionTicks") - .HasColumnType("bigint"); - - b.Property("Played") - .HasColumnType("boolean"); - - b.Property("Rating") - .HasColumnType("double precision"); - - b.Property("SubtitleStreamIndex") - .HasColumnType("integer"); - - b.HasKey("ItemId", "UserId", "CustomDataKey"); - - b.HasIndex("UserId"); - - b.HasIndex("ItemId", "UserId", "IsFavorite"); - - b.HasIndex("ItemId", "UserId", "LastPlayedDate"); - - b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks"); - - b.HasIndex("ItemId", "UserId", "Played"); - - b.ToTable("UserData"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("AccessSchedules") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Children") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem") - .WithMany("ParentAncestors") - .HasForeignKey("ParentItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("ParentItem"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany() - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Images") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("LockedFields") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Provider") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("TrailerTypes") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Chapters") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("DisplayPreferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => - { - b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null) - .WithMany("HomeSections") - .HasForeignKey("DisplayPreferencesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithOne("ProfileImage") - .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("ItemDisplayPreferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("ItemValues") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue") - .WithMany("BaseItemsMap") - .HasForeignKey("ItemValueId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("ItemValue"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("MediaStreams") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Peoples") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.People", "People") - .WithMany("BaseItems") - .HasForeignKey("PeopleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("People"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("Permissions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("Preferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => - { - b.HasOne("Jellyfin.Data.Entities.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("UserData") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => - { - b.Navigation("Chapters"); - - b.Navigation("Children"); - - b.Navigation("Images"); - - b.Navigation("ItemValues"); - - b.Navigation("LockedFields"); - - b.Navigation("MediaStreams"); - - b.Navigation("ParentAncestors"); - - b.Navigation("Peoples"); - - b.Navigation("Provider"); - - b.Navigation("TrailerTypes"); - - b.Navigation("UserData"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.Navigation("HomeSections"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => - { - b.Navigation("BaseItemsMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.People", b => - { - b.Navigation("BaseItems"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.User", b => - { - b.Navigation("AccessSchedules"); - - b.Navigation("DisplayPreferences"); - - b.Navigation("ItemDisplayPreferences"); - - b.Navigation("Permissions"); - - b.Navigation("Preferences"); - - b.Navigation("ProfileImage"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs deleted file mode 100644 index ad1d28b136..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250127174201_InitMigration.cs +++ /dev/null @@ -1,1106 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace Jellyfin.Database.Providers.PgSql.Migrations -{ - /// - public partial class InitMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "ActivityLogs", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - Name = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), - Overview = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - ShortOverview = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - Type = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - UserId = table.Column(type: "uuid", nullable: false), - ItemId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - DateCreated = table.Column(type: "timestamp with time zone", nullable: false), - LogSeverity = table.Column(type: "integer", nullable: false), - RowVersion = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ActivityLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "ApiKeys", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - DateCreated = table.Column(type: "timestamp with time zone", nullable: false), - DateLastActivity = table.Column(type: "timestamp with time zone", nullable: false), - Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - AccessToken = table.Column(type: "text", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ApiKeys", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "BaseItems", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Type = table.Column(type: "text", nullable: false), - Data = table.Column(type: "text", nullable: true), - Path = table.Column(type: "text", nullable: true), - StartDate = table.Column(type: "timestamp with time zone", nullable: false), - EndDate = table.Column(type: "timestamp with time zone", nullable: false), - ChannelId = table.Column(type: "text", nullable: true), - IsMovie = table.Column(type: "boolean", nullable: false), - CommunityRating = table.Column(type: "real", nullable: true), - CustomRating = table.Column(type: "text", nullable: true), - IndexNumber = table.Column(type: "integer", nullable: true), - IsLocked = table.Column(type: "boolean", nullable: false), - Name = table.Column(type: "text", nullable: true), - OfficialRating = table.Column(type: "text", nullable: true), - MediaType = table.Column(type: "text", nullable: true), - Overview = table.Column(type: "text", nullable: true), - ParentIndexNumber = table.Column(type: "integer", nullable: true), - PremiereDate = table.Column(type: "timestamp with time zone", nullable: true), - ProductionYear = table.Column(type: "integer", nullable: true), - Genres = table.Column(type: "text", nullable: true), - SortName = table.Column(type: "text", nullable: true), - ForcedSortName = table.Column(type: "text", nullable: true), - RunTimeTicks = table.Column(type: "bigint", nullable: true), - DateCreated = table.Column(type: "timestamp with time zone", nullable: true), - DateModified = table.Column(type: "timestamp with time zone", nullable: true), - IsSeries = table.Column(type: "boolean", nullable: false), - EpisodeTitle = table.Column(type: "text", nullable: true), - IsRepeat = table.Column(type: "boolean", nullable: false), - PreferredMetadataLanguage = table.Column(type: "text", nullable: true), - PreferredMetadataCountryCode = table.Column(type: "text", nullable: true), - DateLastRefreshed = table.Column(type: "timestamp with time zone", nullable: true), - DateLastSaved = table.Column(type: "timestamp with time zone", nullable: true), - IsInMixedFolder = table.Column(type: "boolean", nullable: false), - Studios = table.Column(type: "text", nullable: true), - ExternalServiceId = table.Column(type: "text", nullable: true), - Tags = table.Column(type: "text", nullable: true), - IsFolder = table.Column(type: "boolean", nullable: false), - InheritedParentalRatingValue = table.Column(type: "integer", nullable: true), - UnratedType = table.Column(type: "text", nullable: true), - CriticRating = table.Column(type: "real", nullable: true), - CleanName = table.Column(type: "text", nullable: true), - PresentationUniqueKey = table.Column(type: "text", nullable: true), - OriginalTitle = table.Column(type: "text", nullable: true), - PrimaryVersionId = table.Column(type: "text", nullable: true), - DateLastMediaAdded = table.Column(type: "timestamp with time zone", nullable: true), - Album = table.Column(type: "text", nullable: true), - LUFS = table.Column(type: "real", nullable: true), - NormalizationGain = table.Column(type: "real", nullable: true), - IsVirtualItem = table.Column(type: "boolean", nullable: false), - SeriesName = table.Column(type: "text", nullable: true), - SeasonName = table.Column(type: "text", nullable: true), - ExternalSeriesId = table.Column(type: "text", nullable: true), - Tagline = table.Column(type: "text", nullable: true), - ProductionLocations = table.Column(type: "text", nullable: true), - ExtraIds = table.Column(type: "text", nullable: true), - TotalBitrate = table.Column(type: "integer", nullable: true), - ExtraType = table.Column(type: "integer", nullable: true), - Artists = table.Column(type: "text", nullable: true), - AlbumArtists = table.Column(type: "text", nullable: true), - ExternalId = table.Column(type: "text", nullable: true), - SeriesPresentationUniqueKey = table.Column(type: "text", nullable: true), - ShowId = table.Column(type: "text", nullable: true), - OwnerId = table.Column(type: "text", nullable: true), - Width = table.Column(type: "integer", nullable: true), - Height = table.Column(type: "integer", nullable: true), - Size = table.Column(type: "bigint", nullable: true), - Audio = table.Column(type: "integer", nullable: true), - ParentId = table.Column(type: "uuid", nullable: true), - TopParentId = table.Column(type: "uuid", nullable: true), - SeasonId = table.Column(type: "uuid", nullable: true), - SeriesId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_BaseItems", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CustomItemDisplayPreferences", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false), - Client = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - Key = table.Column(type: "text", nullable: false), - Value = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CustomItemDisplayPreferences", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "DeviceOptions", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - DeviceId = table.Column(type: "text", nullable: false), - CustomName = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_DeviceOptions", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "ItemValues", - columns: table => new - { - ItemValueId = table.Column(type: "uuid", nullable: false), - Type = table.Column(type: "integer", nullable: false), - Value = table.Column(type: "text", nullable: false), - CleanValue = table.Column(type: "text", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ItemValues", x => x.ItemValueId); - }); - - migrationBuilder.CreateTable( - name: "MediaSegments", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false), - Type = table.Column(type: "integer", nullable: false), - EndTicks = table.Column(type: "bigint", nullable: false), - StartTicks = table.Column(type: "bigint", nullable: false), - SegmentProviderId = table.Column(type: "text", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_MediaSegments", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Peoples", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "text", nullable: false), - PersonType = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Peoples", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "TrickplayInfos", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - Width = table.Column(type: "integer", nullable: false), - Height = table.Column(type: "integer", nullable: false), - TileWidth = table.Column(type: "integer", nullable: false), - TileHeight = table.Column(type: "integer", nullable: false), - ThumbnailCount = table.Column(type: "integer", nullable: false), - Interval = table.Column(type: "integer", nullable: false), - Bandwidth = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_TrickplayInfos", x => new { x.ItemId, x.Width }); - }); - - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Username = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - Password = table.Column(type: "character varying(65535)", maxLength: 65535, nullable: true), - MustUpdatePassword = table.Column(type: "boolean", nullable: false), - AudioLanguagePreference = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), - AuthenticationProviderId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - PasswordResetProviderId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), - InvalidLoginAttemptCount = table.Column(type: "integer", nullable: false), - LastActivityDate = table.Column(type: "timestamp with time zone", nullable: true), - LastLoginDate = table.Column(type: "timestamp with time zone", nullable: true), - LoginAttemptsBeforeLockout = table.Column(type: "integer", nullable: true), - MaxActiveSessions = table.Column(type: "integer", nullable: false), - SubtitleMode = table.Column(type: "integer", nullable: false), - PlayDefaultAudioTrack = table.Column(type: "boolean", nullable: false), - SubtitleLanguagePreference = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), - DisplayMissingEpisodes = table.Column(type: "boolean", nullable: false), - DisplayCollectionsView = table.Column(type: "boolean", nullable: false), - EnableLocalPassword = table.Column(type: "boolean", nullable: false), - HidePlayedInLatest = table.Column(type: "boolean", nullable: false), - RememberAudioSelections = table.Column(type: "boolean", nullable: false), - RememberSubtitleSelections = table.Column(type: "boolean", nullable: false), - EnableNextEpisodeAutoPlay = table.Column(type: "boolean", nullable: false), - EnableAutoLogin = table.Column(type: "boolean", nullable: false), - EnableUserPreferenceAccess = table.Column(type: "boolean", nullable: false), - MaxParentalAgeRating = table.Column(type: "integer", nullable: true), - RemoteClientBitrateLimit = table.Column(type: "integer", nullable: true), - InternalId = table.Column(type: "bigint", nullable: false), - SyncPlayAccess = table.Column(type: "integer", nullable: false), - CastReceiverId = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - RowVersion = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AncestorIds", - columns: table => new - { - ParentItemId = table.Column(type: "uuid", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AncestorIds", x => new { x.ItemId, x.ParentItemId }); - table.ForeignKey( - name: "FK_AncestorIds_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AncestorIds_BaseItems_ParentItemId", - column: x => x.ParentItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AttachmentStreamInfos", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - Index = table.Column(type: "integer", nullable: false), - Codec = table.Column(type: "text", nullable: false), - CodecTag = table.Column(type: "text", nullable: true), - Comment = table.Column(type: "text", nullable: true), - Filename = table.Column(type: "text", nullable: true), - MimeType = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AttachmentStreamInfos", x => new { x.ItemId, x.Index }); - table.ForeignKey( - name: "FK_AttachmentStreamInfos_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "BaseItemImageInfos", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Path = table.Column(type: "text", nullable: false), - DateModified = table.Column(type: "timestamp with time zone", nullable: false), - ImageType = table.Column(type: "integer", nullable: false), - Width = table.Column(type: "integer", nullable: false), - Height = table.Column(type: "integer", nullable: false), - Blurhash = table.Column(type: "bytea", nullable: true), - ItemId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BaseItemImageInfos", x => x.Id); - table.ForeignKey( - name: "FK_BaseItemImageInfos_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "BaseItemMetadataFields", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BaseItemMetadataFields", x => new { x.Id, x.ItemId }); - table.ForeignKey( - name: "FK_BaseItemMetadataFields_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "BaseItemProviders", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - ProviderId = table.Column(type: "text", nullable: false), - ProviderValue = table.Column(type: "text", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BaseItemProviders", x => new { x.ItemId, x.ProviderId }); - table.ForeignKey( - name: "FK_BaseItemProviders_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "BaseItemTrailerTypes", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_BaseItemTrailerTypes", x => new { x.Id, x.ItemId }); - table.ForeignKey( - name: "FK_BaseItemTrailerTypes_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Chapters", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - ChapterIndex = table.Column(type: "integer", nullable: false), - StartPositionTicks = table.Column(type: "bigint", nullable: false), - Name = table.Column(type: "text", nullable: true), - ImagePath = table.Column(type: "text", nullable: true), - ImageDateModified = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Chapters", x => new { x.ItemId, x.ChapterIndex }); - table.ForeignKey( - name: "FK_Chapters_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "MediaStreamInfos", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - StreamIndex = table.Column(type: "integer", nullable: false), - StreamType = table.Column(type: "integer", nullable: false), - Codec = table.Column(type: "text", nullable: true), - Language = table.Column(type: "text", nullable: true), - ChannelLayout = table.Column(type: "text", nullable: true), - Profile = table.Column(type: "text", nullable: true), - AspectRatio = table.Column(type: "text", nullable: true), - Path = table.Column(type: "text", nullable: true), - IsInterlaced = table.Column(type: "boolean", nullable: true), - BitRate = table.Column(type: "integer", nullable: true), - Channels = table.Column(type: "integer", nullable: true), - SampleRate = table.Column(type: "integer", nullable: true), - IsDefault = table.Column(type: "boolean", nullable: false), - IsForced = table.Column(type: "boolean", nullable: false), - IsExternal = table.Column(type: "boolean", nullable: false), - Height = table.Column(type: "integer", nullable: true), - Width = table.Column(type: "integer", nullable: true), - AverageFrameRate = table.Column(type: "real", nullable: true), - RealFrameRate = table.Column(type: "real", nullable: true), - Level = table.Column(type: "real", nullable: true), - PixelFormat = table.Column(type: "text", nullable: true), - BitDepth = table.Column(type: "integer", nullable: true), - IsAnamorphic = table.Column(type: "boolean", nullable: true), - RefFrames = table.Column(type: "integer", nullable: true), - CodecTag = table.Column(type: "text", nullable: true), - Comment = table.Column(type: "text", nullable: true), - NalLengthSize = table.Column(type: "text", nullable: true), - IsAvc = table.Column(type: "boolean", nullable: true), - Title = table.Column(type: "text", nullable: true), - TimeBase = table.Column(type: "text", nullable: true), - CodecTimeBase = table.Column(type: "text", nullable: true), - ColorPrimaries = table.Column(type: "text", nullable: true), - ColorSpace = table.Column(type: "text", nullable: true), - ColorTransfer = table.Column(type: "text", nullable: true), - DvVersionMajor = table.Column(type: "integer", nullable: true), - DvVersionMinor = table.Column(type: "integer", nullable: true), - DvProfile = table.Column(type: "integer", nullable: true), - DvLevel = table.Column(type: "integer", nullable: true), - RpuPresentFlag = table.Column(type: "integer", nullable: true), - ElPresentFlag = table.Column(type: "integer", nullable: true), - BlPresentFlag = table.Column(type: "integer", nullable: true), - DvBlSignalCompatibilityId = table.Column(type: "integer", nullable: true), - IsHearingImpaired = table.Column(type: "boolean", nullable: true), - Rotation = table.Column(type: "integer", nullable: true), - KeyFrames = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_MediaStreamInfos", x => new { x.ItemId, x.StreamIndex }); - table.ForeignKey( - name: "FK_MediaStreamInfos_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ItemValuesMap", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - ItemValueId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ItemValuesMap", x => new { x.ItemValueId, x.ItemId }); - table.ForeignKey( - name: "FK_ItemValuesMap_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_ItemValuesMap_ItemValues_ItemValueId", - column: x => x.ItemValueId, - principalTable: "ItemValues", - principalColumn: "ItemValueId", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "PeopleBaseItemMap", - columns: table => new - { - ItemId = table.Column(type: "uuid", nullable: false), - PeopleId = table.Column(type: "uuid", nullable: false), - SortOrder = table.Column(type: "integer", nullable: true), - ListOrder = table.Column(type: "integer", nullable: true), - Role = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PeopleBaseItemMap", x => new { x.ItemId, x.PeopleId }); - table.ForeignKey( - name: "FK_PeopleBaseItemMap_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_PeopleBaseItemMap_Peoples_PeopleId", - column: x => x.PeopleId, - principalTable: "Peoples", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AccessSchedules", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: false), - DayOfWeek = table.Column(type: "integer", nullable: false), - StartHour = table.Column(type: "double precision", nullable: false), - EndHour = table.Column(type: "double precision", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AccessSchedules", x => x.Id); - table.ForeignKey( - name: "FK_AccessSchedules_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Devices", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: false), - AccessToken = table.Column(type: "text", nullable: false), - AppName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - AppVersion = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - DeviceName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - DeviceId = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - IsActive = table.Column(type: "boolean", nullable: false), - DateCreated = table.Column(type: "timestamp with time zone", nullable: false), - DateModified = table.Column(type: "timestamp with time zone", nullable: false), - DateLastActivity = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Devices", x => x.Id); - table.ForeignKey( - name: "FK_Devices_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DisplayPreferences", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false), - Client = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - ShowSidebar = table.Column(type: "boolean", nullable: false), - ShowBackdrop = table.Column(type: "boolean", nullable: false), - ScrollDirection = table.Column(type: "integer", nullable: false), - IndexBy = table.Column(type: "integer", nullable: true), - SkipForwardLength = table.Column(type: "integer", nullable: false), - SkipBackwardLength = table.Column(type: "integer", nullable: false), - ChromecastVersion = table.Column(type: "integer", nullable: false), - EnableNextVideoInfoOverlay = table.Column(type: "boolean", nullable: false), - DashboardTheme = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - TvHome = table.Column(type: "character varying(32)", maxLength: 32, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_DisplayPreferences", x => x.Id); - table.ForeignKey( - name: "FK_DisplayPreferences_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ImageInfos", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: true), - Path = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), - LastModified = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ImageInfos", x => x.Id); - table.ForeignKey( - name: "FK_ImageInfos_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "ItemDisplayPreferences", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false), - Client = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - ViewType = table.Column(type: "integer", nullable: false), - RememberIndexing = table.Column(type: "boolean", nullable: false), - IndexBy = table.Column(type: "integer", nullable: true), - RememberSorting = table.Column(type: "boolean", nullable: false), - SortBy = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - SortOrder = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ItemDisplayPreferences", x => x.Id); - table.ForeignKey( - name: "FK_ItemDisplayPreferences_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Permissions", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: true), - Kind = table.Column(type: "integer", nullable: false), - Value = table.Column(type: "boolean", nullable: false), - RowVersion = table.Column(type: "bigint", nullable: false), - Permission_Permissions_Guid = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Permissions", x => x.Id); - table.ForeignKey( - name: "FK_Permissions_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Preferences", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - UserId = table.Column(type: "uuid", nullable: true), - Kind = table.Column(type: "integer", nullable: false), - Value = table.Column(type: "character varying(65535)", maxLength: 65535, nullable: false), - RowVersion = table.Column(type: "bigint", nullable: false), - Preference_Preferences_Guid = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Preferences", x => x.Id); - table.ForeignKey( - name: "FK_Preferences_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserData", - columns: table => new - { - CustomDataKey = table.Column(type: "text", nullable: false), - ItemId = table.Column(type: "uuid", nullable: false), - UserId = table.Column(type: "uuid", nullable: false), - Rating = table.Column(type: "double precision", nullable: true), - PlaybackPositionTicks = table.Column(type: "bigint", nullable: false), - PlayCount = table.Column(type: "integer", nullable: false), - IsFavorite = table.Column(type: "boolean", nullable: false), - LastPlayedDate = table.Column(type: "timestamp with time zone", nullable: true), - Played = table.Column(type: "boolean", nullable: false), - AudioStreamIndex = table.Column(type: "integer", nullable: true), - SubtitleStreamIndex = table.Column(type: "integer", nullable: true), - Likes = table.Column(type: "boolean", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserData", x => new { x.ItemId, x.UserId, x.CustomDataKey }); - table.ForeignKey( - name: "FK_UserData_BaseItems_ItemId", - column: x => x.ItemId, - principalTable: "BaseItems", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserData_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "HomeSection", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - DisplayPreferencesId = table.Column(type: "integer", nullable: false), - Order = table.Column(type: "integer", nullable: false), - Type = table.Column(type: "integer", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_HomeSection", x => x.Id); - table.ForeignKey( - name: "FK_HomeSection_DisplayPreferences_DisplayPreferencesId", - column: x => x.DisplayPreferencesId, - principalTable: "DisplayPreferences", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AccessSchedules_UserId", - table: "AccessSchedules", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_ActivityLogs_DateCreated", - table: "ActivityLogs", - column: "DateCreated"); - - migrationBuilder.CreateIndex( - name: "IX_AncestorIds_ParentItemId", - table: "AncestorIds", - column: "ParentItemId"); - - migrationBuilder.CreateIndex( - name: "IX_ApiKeys_AccessToken", - table: "ApiKeys", - column: "AccessToken", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_BaseItemImageInfos_ItemId", - table: "BaseItemImageInfos", - column: "ItemId"); - - migrationBuilder.CreateIndex( - name: "IX_BaseItemMetadataFields_ItemId", - table: "BaseItemMetadataFields", - column: "ItemId"); - - migrationBuilder.CreateIndex( - name: "IX_BaseItemProviders_ProviderId_ProviderValue_ItemId", - table: "BaseItemProviders", - columns: new[] { "ProviderId", "ProviderValue", "ItemId" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Id_Type_IsFolder_IsVirtualItem", - table: "BaseItems", - columns: new[] { "Id", "Type", "IsFolder", "IsVirtualItem" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_IsFolder_TopParentId_IsVirtualItem_PresentationUn~", - table: "BaseItems", - columns: new[] { "IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_MediaType_TopParentId_IsVirtualItem_PresentationU~", - table: "BaseItems", - columns: new[] { "MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_ParentId", - table: "BaseItems", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Path", - table: "BaseItems", - column: "Path"); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_PresentationUniqueKey", - table: "BaseItems", - column: "PresentationUniqueKey"); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_TopParentId_Id", - table: "BaseItems", - columns: new[] { "TopParentId", "Id" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Type_SeriesPresentationUniqueKey_IsFolder_IsVirtu~", - table: "BaseItems", - columns: new[] { "Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Type_SeriesPresentationUniqueKey_PresentationUniq~", - table: "BaseItems", - columns: new[] { "Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Type_TopParentId_Id", - table: "BaseItems", - columns: new[] { "Type", "TopParentId", "Id" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Type_TopParentId_IsVirtualItem_PresentationUnique~", - table: "BaseItems", - columns: new[] { "Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Type_TopParentId_PresentationUniqueKey", - table: "BaseItems", - columns: new[] { "Type", "TopParentId", "PresentationUniqueKey" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItems_Type_TopParentId_StartDate", - table: "BaseItems", - columns: new[] { "Type", "TopParentId", "StartDate" }); - - migrationBuilder.CreateIndex( - name: "IX_BaseItemTrailerTypes_ItemId", - table: "BaseItemTrailerTypes", - column: "ItemId"); - - migrationBuilder.CreateIndex( - name: "IX_CustomItemDisplayPreferences_UserId_ItemId_Client_Key", - table: "CustomItemDisplayPreferences", - columns: new[] { "UserId", "ItemId", "Client", "Key" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_DeviceOptions_DeviceId", - table: "DeviceOptions", - column: "DeviceId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Devices_AccessToken_DateLastActivity", - table: "Devices", - columns: new[] { "AccessToken", "DateLastActivity" }); - - migrationBuilder.CreateIndex( - name: "IX_Devices_DeviceId", - table: "Devices", - column: "DeviceId"); - - migrationBuilder.CreateIndex( - name: "IX_Devices_DeviceId_DateLastActivity", - table: "Devices", - columns: new[] { "DeviceId", "DateLastActivity" }); - - migrationBuilder.CreateIndex( - name: "IX_Devices_UserId_DeviceId", - table: "Devices", - columns: new[] { "UserId", "DeviceId" }); - - migrationBuilder.CreateIndex( - name: "IX_DisplayPreferences_UserId_ItemId_Client", - table: "DisplayPreferences", - columns: new[] { "UserId", "ItemId", "Client" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_HomeSection_DisplayPreferencesId", - table: "HomeSection", - column: "DisplayPreferencesId"); - - migrationBuilder.CreateIndex( - name: "IX_ImageInfos_UserId", - table: "ImageInfos", - column: "UserId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_ItemDisplayPreferences_UserId", - table: "ItemDisplayPreferences", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_ItemValues_Type_CleanValue", - table: "ItemValues", - columns: new[] { "Type", "CleanValue" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_ItemValuesMap_ItemId", - table: "ItemValuesMap", - column: "ItemId"); - - migrationBuilder.CreateIndex( - name: "IX_MediaStreamInfos_StreamIndex", - table: "MediaStreamInfos", - column: "StreamIndex"); - - migrationBuilder.CreateIndex( - name: "IX_MediaStreamInfos_StreamIndex_StreamType", - table: "MediaStreamInfos", - columns: new[] { "StreamIndex", "StreamType" }); - - migrationBuilder.CreateIndex( - name: "IX_MediaStreamInfos_StreamIndex_StreamType_Language", - table: "MediaStreamInfos", - columns: new[] { "StreamIndex", "StreamType", "Language" }); - - migrationBuilder.CreateIndex( - name: "IX_MediaStreamInfos_StreamType", - table: "MediaStreamInfos", - column: "StreamType"); - - migrationBuilder.CreateIndex( - name: "IX_PeopleBaseItemMap_ItemId_ListOrder", - table: "PeopleBaseItemMap", - columns: new[] { "ItemId", "ListOrder" }); - - migrationBuilder.CreateIndex( - name: "IX_PeopleBaseItemMap_ItemId_SortOrder", - table: "PeopleBaseItemMap", - columns: new[] { "ItemId", "SortOrder" }); - - migrationBuilder.CreateIndex( - name: "IX_PeopleBaseItemMap_PeopleId", - table: "PeopleBaseItemMap", - column: "PeopleId"); - - migrationBuilder.CreateIndex( - name: "IX_Peoples_Name", - table: "Peoples", - column: "Name"); - - // this was edited manually because "UserId" is a reserved name in pgsql - migrationBuilder.CreateIndex( - name: "IX_Permissions_UserId_Kind", - table: "Permissions", - columns: new[] { "UserId", "Kind" }, - unique: true, - filter: "\"Permissions\".\"UserId\" IS NOT NULL"); - - // this was edited manually because "UserId" is a reserved name in pgsql - migrationBuilder.CreateIndex( - name: "IX_Preferences_UserId_Kind", - table: "Preferences", - columns: new[] { "UserId", "Kind" }, - unique: true, - filter: "\"Preferences\".\"UserId\" IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_UserData_ItemId_UserId_IsFavorite", - table: "UserData", - columns: new[] { "ItemId", "UserId", "IsFavorite" }); - - migrationBuilder.CreateIndex( - name: "IX_UserData_ItemId_UserId_LastPlayedDate", - table: "UserData", - columns: new[] { "ItemId", "UserId", "LastPlayedDate" }); - - migrationBuilder.CreateIndex( - name: "IX_UserData_ItemId_UserId_PlaybackPositionTicks", - table: "UserData", - columns: new[] { "ItemId", "UserId", "PlaybackPositionTicks" }); - - migrationBuilder.CreateIndex( - name: "IX_UserData_ItemId_UserId_Played", - table: "UserData", - columns: new[] { "ItemId", "UserId", "Played" }); - - migrationBuilder.CreateIndex( - name: "IX_UserData_UserId", - table: "UserData", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_Users_Username", - table: "Users", - column: "Username", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AccessSchedules"); - - migrationBuilder.DropTable( - name: "ActivityLogs"); - - migrationBuilder.DropTable( - name: "AncestorIds"); - - migrationBuilder.DropTable( - name: "ApiKeys"); - - migrationBuilder.DropTable( - name: "AttachmentStreamInfos"); - - migrationBuilder.DropTable( - name: "BaseItemImageInfos"); - - migrationBuilder.DropTable( - name: "BaseItemMetadataFields"); - - migrationBuilder.DropTable( - name: "BaseItemProviders"); - - migrationBuilder.DropTable( - name: "BaseItemTrailerTypes"); - - migrationBuilder.DropTable( - name: "Chapters"); - - migrationBuilder.DropTable( - name: "CustomItemDisplayPreferences"); - - migrationBuilder.DropTable( - name: "DeviceOptions"); - - migrationBuilder.DropTable( - name: "Devices"); - - migrationBuilder.DropTable( - name: "HomeSection"); - - migrationBuilder.DropTable( - name: "ImageInfos"); - - migrationBuilder.DropTable( - name: "ItemDisplayPreferences"); - - migrationBuilder.DropTable( - name: "ItemValuesMap"); - - migrationBuilder.DropTable( - name: "MediaSegments"); - - migrationBuilder.DropTable( - name: "MediaStreamInfos"); - - migrationBuilder.DropTable( - name: "PeopleBaseItemMap"); - - migrationBuilder.DropTable( - name: "Permissions"); - - migrationBuilder.DropTable( - name: "Preferences"); - - migrationBuilder.DropTable( - name: "TrickplayInfos"); - - migrationBuilder.DropTable( - name: "UserData"); - - migrationBuilder.DropTable( - name: "DisplayPreferences"); - - migrationBuilder.DropTable( - name: "ItemValues"); - - migrationBuilder.DropTable( - name: "Peoples"); - - migrationBuilder.DropTable( - name: "BaseItems"); - - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.Designer.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.Designer.cs deleted file mode 100644 index 6e8aba54bf..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.Designer.cs +++ /dev/null @@ -1,1623 +0,0 @@ -// -using System; -using Jellyfin.Server.Implementations; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace Jellyfin.Database.Providers.PgSql.Migrations -{ - [DbContext(typeof(JellyfinDbContext))] - [Migration("20250205183152_MakeStartEndDateNullable")] - partial class MakeStartEndDateNullable - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DayOfWeek") - .HasColumnType("integer"); - - b.Property("EndHour") - .HasColumnType("double precision"); - - b.Property("StartHour") - .HasColumnType("double precision"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AccessSchedules"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("ItemId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LogSeverity") - .HasColumnType("integer"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Overview") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("ShortOverview") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("DateCreated"); - - b.ToTable("ActivityLogs"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ParentItemId") - .HasColumnType("uuid"); - - b.HasKey("ItemId", "ParentItemId"); - - b.HasIndex("ParentItemId"); - - b.ToTable("AncestorIds"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Index") - .HasColumnType("integer"); - - b.Property("Codec") - .IsRequired() - .HasColumnType("text"); - - b.Property("CodecTag") - .HasColumnType("text"); - - b.Property("Comment") - .HasColumnType("text"); - - b.Property("Filename") - .HasColumnType("text"); - - b.Property("MimeType") - .HasColumnType("text"); - - b.HasKey("ItemId", "Index"); - - b.ToTable("AttachmentStreamInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Album") - .HasColumnType("text"); - - b.Property("AlbumArtists") - .HasColumnType("text"); - - b.Property("Artists") - .HasColumnType("text"); - - b.Property("Audio") - .HasColumnType("integer"); - - b.Property("ChannelId") - .HasColumnType("text"); - - b.Property("CleanName") - .HasColumnType("text"); - - b.Property("CommunityRating") - .HasColumnType("real"); - - b.Property("CriticRating") - .HasColumnType("real"); - - b.Property("CustomRating") - .HasColumnType("text"); - - b.Property("Data") - .HasColumnType("text"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastMediaAdded") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastRefreshed") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastSaved") - .HasColumnType("timestamp with time zone"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("EpisodeTitle") - .HasColumnType("text"); - - b.Property("ExternalId") - .HasColumnType("text"); - - b.Property("ExternalSeriesId") - .HasColumnType("text"); - - b.Property("ExternalServiceId") - .HasColumnType("text"); - - b.Property("ExtraIds") - .HasColumnType("text"); - - b.Property("ExtraType") - .HasColumnType("integer"); - - b.Property("ForcedSortName") - .HasColumnType("text"); - - b.Property("Genres") - .HasColumnType("text"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("IndexNumber") - .HasColumnType("integer"); - - b.Property("InheritedParentalRatingValue") - .HasColumnType("integer"); - - b.Property("IsFolder") - .HasColumnType("boolean"); - - b.Property("IsInMixedFolder") - .HasColumnType("boolean"); - - b.Property("IsLocked") - .HasColumnType("boolean"); - - b.Property("IsMovie") - .HasColumnType("boolean"); - - b.Property("IsRepeat") - .HasColumnType("boolean"); - - b.Property("IsSeries") - .HasColumnType("boolean"); - - b.Property("IsVirtualItem") - .HasColumnType("boolean"); - - b.Property("LUFS") - .HasColumnType("real"); - - b.Property("MediaType") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("NormalizationGain") - .HasColumnType("real"); - - b.Property("OfficialRating") - .HasColumnType("text"); - - b.Property("OriginalTitle") - .HasColumnType("text"); - - b.Property("Overview") - .HasColumnType("text"); - - b.Property("OwnerId") - .HasColumnType("text"); - - b.Property("ParentId") - .HasColumnType("uuid"); - - b.Property("ParentIndexNumber") - .HasColumnType("integer"); - - b.Property("Path") - .HasColumnType("text"); - - b.Property("PreferredMetadataCountryCode") - .HasColumnType("text"); - - b.Property("PreferredMetadataLanguage") - .HasColumnType("text"); - - b.Property("PremiereDate") - .HasColumnType("timestamp with time zone"); - - b.Property("PresentationUniqueKey") - .HasColumnType("text"); - - b.Property("PrimaryVersionId") - .HasColumnType("text"); - - b.Property("ProductionLocations") - .HasColumnType("text"); - - b.Property("ProductionYear") - .HasColumnType("integer"); - - b.Property("RunTimeTicks") - .HasColumnType("bigint"); - - b.Property("SeasonId") - .HasColumnType("uuid"); - - b.Property("SeasonName") - .HasColumnType("text"); - - b.Property("SeriesId") - .HasColumnType("uuid"); - - b.Property("SeriesName") - .HasColumnType("text"); - - b.Property("SeriesPresentationUniqueKey") - .HasColumnType("text"); - - b.Property("ShowId") - .HasColumnType("text"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("SortName") - .HasColumnType("text"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Studios") - .HasColumnType("text"); - - b.Property("Tagline") - .HasColumnType("text"); - - b.Property("Tags") - .HasColumnType("text"); - - b.Property("TopParentId") - .HasColumnType("uuid"); - - b.Property("TotalBitrate") - .HasColumnType("integer"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text"); - - b.Property("UnratedType") - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("Path"); - - b.HasIndex("PresentationUniqueKey"); - - b.HasIndex("TopParentId", "Id"); - - b.HasIndex("Type", "TopParentId", "Id"); - - b.HasIndex("Type", "TopParentId", "PresentationUniqueKey"); - - b.HasIndex("Type", "TopParentId", "StartDate"); - - b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem"); - - b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey"); - - b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem"); - - b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName"); - - b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); - - b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); - - b.ToTable("BaseItems"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Blurhash") - .HasColumnType("bytea"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("ImageType") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Path") - .IsRequired() - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemImageInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => - { - b.Property("Id") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("Id", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemMetadataFields"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ProviderId") - .HasColumnType("text"); - - b.Property("ProviderValue") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("ItemId", "ProviderId"); - - b.HasIndex("ProviderId", "ProviderValue", "ItemId"); - - b.ToTable("BaseItemProviders"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => - { - b.Property("Id") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("Id", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemTrailerTypes"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ChapterIndex") - .HasColumnType("integer"); - - b.Property("ImageDateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("ImagePath") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("StartPositionTicks") - .HasColumnType("bigint"); - - b.HasKey("ItemId", "ChapterIndex"); - - b.ToTable("Chapters"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Key") - .IsRequired() - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemId", "Client", "Key") - .IsUnique(); - - b.ToTable("CustomItemDisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChromecastVersion") - .HasColumnType("integer"); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DashboardTheme") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("EnableNextVideoInfoOverlay") - .HasColumnType("boolean"); - - b.Property("IndexBy") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ScrollDirection") - .HasColumnType("integer"); - - b.Property("ShowBackdrop") - .HasColumnType("boolean"); - - b.Property("ShowSidebar") - .HasColumnType("boolean"); - - b.Property("SkipBackwardLength") - .HasColumnType("integer"); - - b.Property("SkipForwardLength") - .HasColumnType("integer"); - - b.Property("TvHome") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemId", "Client") - .IsUnique(); - - b.ToTable("DisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DisplayPreferencesId") - .HasColumnType("integer"); - - b.Property("Order") - .HasColumnType("integer"); - - b.Property("Type") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("DisplayPreferencesId"); - - b.ToTable("HomeSection"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("LastModified") - .HasColumnType("timestamp with time zone"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("ImageInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("IndexBy") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("RememberIndexing") - .HasColumnType("boolean"); - - b.Property("RememberSorting") - .HasColumnType("boolean"); - - b.Property("SortBy") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("ViewType") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("ItemDisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => - { - b.Property("ItemValueId") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CleanValue") - .IsRequired() - .HasColumnType("text"); - - b.Property("Type") - .HasColumnType("integer"); - - b.Property("Value") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("ItemValueId"); - - b.HasIndex("Type", "CleanValue") - .IsUnique(); - - b.ToTable("ItemValues"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => - { - b.Property("ItemValueId") - .HasColumnType("uuid"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("ItemValueId", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("ItemValuesMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("EndTicks") - .HasColumnType("bigint"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("SegmentProviderId") - .IsRequired() - .HasColumnType("text"); - - b.Property("StartTicks") - .HasColumnType("bigint"); - - b.Property("Type") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.ToTable("MediaSegments"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("StreamIndex") - .HasColumnType("integer"); - - b.Property("AspectRatio") - .HasColumnType("text"); - - b.Property("AverageFrameRate") - .HasColumnType("real"); - - b.Property("BitDepth") - .HasColumnType("integer"); - - b.Property("BitRate") - .HasColumnType("integer"); - - b.Property("BlPresentFlag") - .HasColumnType("integer"); - - b.Property("ChannelLayout") - .HasColumnType("text"); - - b.Property("Channels") - .HasColumnType("integer"); - - b.Property("Codec") - .HasColumnType("text"); - - b.Property("CodecTag") - .HasColumnType("text"); - - b.Property("CodecTimeBase") - .HasColumnType("text"); - - b.Property("ColorPrimaries") - .HasColumnType("text"); - - b.Property("ColorSpace") - .HasColumnType("text"); - - b.Property("ColorTransfer") - .HasColumnType("text"); - - b.Property("Comment") - .HasColumnType("text"); - - b.Property("DvBlSignalCompatibilityId") - .HasColumnType("integer"); - - b.Property("DvLevel") - .HasColumnType("integer"); - - b.Property("DvProfile") - .HasColumnType("integer"); - - b.Property("DvVersionMajor") - .HasColumnType("integer"); - - b.Property("DvVersionMinor") - .HasColumnType("integer"); - - b.Property("ElPresentFlag") - .HasColumnType("integer"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("IsAnamorphic") - .HasColumnType("boolean"); - - b.Property("IsAvc") - .HasColumnType("boolean"); - - b.Property("IsDefault") - .HasColumnType("boolean"); - - b.Property("IsExternal") - .HasColumnType("boolean"); - - b.Property("IsForced") - .HasColumnType("boolean"); - - b.Property("IsHearingImpaired") - .HasColumnType("boolean"); - - b.Property("IsInterlaced") - .HasColumnType("boolean"); - - b.Property("KeyFrames") - .HasColumnType("text"); - - b.Property("Language") - .HasColumnType("text"); - - b.Property("Level") - .HasColumnType("real"); - - b.Property("NalLengthSize") - .HasColumnType("text"); - - b.Property("Path") - .HasColumnType("text"); - - b.Property("PixelFormat") - .HasColumnType("text"); - - b.Property("Profile") - .HasColumnType("text"); - - b.Property("RealFrameRate") - .HasColumnType("real"); - - b.Property("RefFrames") - .HasColumnType("integer"); - - b.Property("Rotation") - .HasColumnType("integer"); - - b.Property("RpuPresentFlag") - .HasColumnType("integer"); - - b.Property("SampleRate") - .HasColumnType("integer"); - - b.Property("StreamType") - .HasColumnType("integer"); - - b.Property("TimeBase") - .HasColumnType("text"); - - b.Property("Title") - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("ItemId", "StreamIndex"); - - b.HasIndex("StreamIndex"); - - b.HasIndex("StreamType"); - - b.HasIndex("StreamIndex", "StreamType"); - - b.HasIndex("StreamIndex", "StreamType", "Language"); - - b.ToTable("MediaStreamInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.People", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("PersonType") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("Peoples"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("PeopleId") - .HasColumnType("uuid"); - - b.Property("ListOrder") - .HasColumnType("integer"); - - b.Property("Role") - .HasColumnType("text"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.HasKey("ItemId", "PeopleId"); - - b.HasIndex("PeopleId"); - - b.HasIndex("ItemId", "ListOrder"); - - b.HasIndex("ItemId", "SortOrder"); - - b.ToTable("PeopleBaseItemMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Kind") - .HasColumnType("integer"); - - b.Property("Permission_Permissions_Guid") - .HasColumnType("uuid"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "Kind") - .IsUnique() - .HasFilter("[UserId] IS NOT NULL"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Kind") - .HasColumnType("integer"); - - b.Property("Preference_Preferences_Guid") - .HasColumnType("uuid"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(65535) - .HasColumnType("character varying(65535)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "Kind") - .IsUnique() - .HasFilter("[UserId] IS NOT NULL"); - - b.ToTable("Preferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AccessToken") - .IsRequired() - .HasColumnType("text"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastActivity") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("AccessToken") - .IsUnique(); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AccessToken") - .IsRequired() - .HasColumnType("text"); - - b.Property("AppName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("AppVersion") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastActivity") - .HasColumnType("timestamp with time zone"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("IsActive") - .HasColumnType("boolean"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("DeviceId"); - - b.HasIndex("AccessToken", "DateLastActivity"); - - b.HasIndex("DeviceId", "DateLastActivity"); - - b.HasIndex("UserId", "DeviceId"); - - b.ToTable("Devices"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CustomName") - .HasColumnType("text"); - - b.Property("DeviceId") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("DeviceId") - .IsUnique(); - - b.ToTable("DeviceOptions"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Width") - .HasColumnType("integer"); - - b.Property("Bandwidth") - .HasColumnType("integer"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("Interval") - .HasColumnType("integer"); - - b.Property("ThumbnailCount") - .HasColumnType("integer"); - - b.Property("TileHeight") - .HasColumnType("integer"); - - b.Property("TileWidth") - .HasColumnType("integer"); - - b.HasKey("ItemId", "Width"); - - b.ToTable("TrickplayInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AudioLanguagePreference") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("AuthenticationProviderId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("CastReceiverId") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DisplayCollectionsView") - .HasColumnType("boolean"); - - b.Property("DisplayMissingEpisodes") - .HasColumnType("boolean"); - - b.Property("EnableAutoLogin") - .HasColumnType("boolean"); - - b.Property("EnableLocalPassword") - .HasColumnType("boolean"); - - b.Property("EnableNextEpisodeAutoPlay") - .HasColumnType("boolean"); - - b.Property("EnableUserPreferenceAccess") - .HasColumnType("boolean"); - - b.Property("HidePlayedInLatest") - .HasColumnType("boolean"); - - b.Property("InternalId") - .HasColumnType("bigint"); - - b.Property("InvalidLoginAttemptCount") - .HasColumnType("integer"); - - b.Property("LastActivityDate") - .HasColumnType("timestamp with time zone"); - - b.Property("LastLoginDate") - .HasColumnType("timestamp with time zone"); - - b.Property("LoginAttemptsBeforeLockout") - .HasColumnType("integer"); - - b.Property("MaxActiveSessions") - .HasColumnType("integer"); - - b.Property("MaxParentalAgeRating") - .HasColumnType("integer"); - - b.Property("MustUpdatePassword") - .HasColumnType("boolean"); - - b.Property("Password") - .HasMaxLength(65535) - .HasColumnType("character varying(65535)"); - - b.Property("PasswordResetProviderId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("PlayDefaultAudioTrack") - .HasColumnType("boolean"); - - b.Property("RememberAudioSelections") - .HasColumnType("boolean"); - - b.Property("RememberSubtitleSelections") - .HasColumnType("boolean"); - - b.Property("RemoteClientBitrateLimit") - .HasColumnType("integer"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("SubtitleLanguagePreference") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("SubtitleMode") - .HasColumnType("integer"); - - b.Property("SyncPlayAccess") - .HasColumnType("integer"); - - b.Property("Username") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.HasKey("Id"); - - b.HasIndex("Username") - .IsUnique(); - - b.ToTable("Users"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("CustomDataKey") - .HasColumnType("text"); - - b.Property("AudioStreamIndex") - .HasColumnType("integer"); - - b.Property("IsFavorite") - .HasColumnType("boolean"); - - b.Property("LastPlayedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Likes") - .HasColumnType("boolean"); - - b.Property("PlayCount") - .HasColumnType("integer"); - - b.Property("PlaybackPositionTicks") - .HasColumnType("bigint"); - - b.Property("Played") - .HasColumnType("boolean"); - - b.Property("Rating") - .HasColumnType("double precision"); - - b.Property("SubtitleStreamIndex") - .HasColumnType("integer"); - - b.HasKey("ItemId", "UserId", "CustomDataKey"); - - b.HasIndex("UserId"); - - b.HasIndex("ItemId", "UserId", "IsFavorite"); - - b.HasIndex("ItemId", "UserId", "LastPlayedDate"); - - b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks"); - - b.HasIndex("ItemId", "UserId", "Played"); - - b.ToTable("UserData"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("AccessSchedules") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Children") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem") - .WithMany("ParentAncestors") - .HasForeignKey("ParentItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("ParentItem"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany() - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Images") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("LockedFields") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Provider") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("TrailerTypes") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Chapters") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("DisplayPreferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => - { - b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null) - .WithMany("HomeSections") - .HasForeignKey("DisplayPreferencesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithOne("ProfileImage") - .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("ItemDisplayPreferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("ItemValues") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue") - .WithMany("BaseItemsMap") - .HasForeignKey("ItemValueId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("ItemValue"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("MediaStreams") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Peoples") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.People", "People") - .WithMany("BaseItems") - .HasForeignKey("PeopleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("People"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("Permissions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("Preferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => - { - b.HasOne("Jellyfin.Data.Entities.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("UserData") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => - { - b.Navigation("Chapters"); - - b.Navigation("Children"); - - b.Navigation("Images"); - - b.Navigation("ItemValues"); - - b.Navigation("LockedFields"); - - b.Navigation("MediaStreams"); - - b.Navigation("ParentAncestors"); - - b.Navigation("Peoples"); - - b.Navigation("Provider"); - - b.Navigation("TrailerTypes"); - - b.Navigation("UserData"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.Navigation("HomeSections"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => - { - b.Navigation("BaseItemsMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.People", b => - { - b.Navigation("BaseItems"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.User", b => - { - b.Navigation("AccessSchedules"); - - b.Navigation("DisplayPreferences"); - - b.Navigation("ItemDisplayPreferences"); - - b.Navigation("Permissions"); - - b.Navigation("Preferences"); - - b.Navigation("ProfileImage"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.cs deleted file mode 100644 index 6ed1ddc5aa..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/20250205183152_MakeStartEndDateNullable.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Jellyfin.Database.Providers.PgSql.Migrations -{ - /// - public partial class MakeStartEndDateNullable : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "StartDate", - table: "BaseItems", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - - migrationBuilder.AlterColumn( - name: "EndDate", - table: "BaseItems", - type: "timestamp with time zone", - nullable: true, - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "StartDate", - table: "BaseItems", - type: "timestamp with time zone", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "EndDate", - table: "BaseItems", - type: "timestamp with time zone", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - oldClrType: typeof(DateTime), - oldType: "timestamp with time zone", - oldNullable: true); - } - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs deleted file mode 100644 index d67fd89d84..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/JellyfinDbContextModelSnapshot.cs +++ /dev/null @@ -1,1620 +0,0 @@ -// -using System; -using Jellyfin.Server.Implementations; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace Jellyfin.Database.Providers.PgSql.Migrations -{ - [DbContext(typeof(JellyfinDbContext))] - partial class JellyfinDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DayOfWeek") - .HasColumnType("integer"); - - b.Property("EndHour") - .HasColumnType("double precision"); - - b.Property("StartHour") - .HasColumnType("double precision"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AccessSchedules"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("ItemId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LogSeverity") - .HasColumnType("integer"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Overview") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("ShortOverview") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("DateCreated"); - - b.ToTable("ActivityLogs"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ParentItemId") - .HasColumnType("uuid"); - - b.HasKey("ItemId", "ParentItemId"); - - b.HasIndex("ParentItemId"); - - b.ToTable("AncestorIds"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Index") - .HasColumnType("integer"); - - b.Property("Codec") - .IsRequired() - .HasColumnType("text"); - - b.Property("CodecTag") - .HasColumnType("text"); - - b.Property("Comment") - .HasColumnType("text"); - - b.Property("Filename") - .HasColumnType("text"); - - b.Property("MimeType") - .HasColumnType("text"); - - b.HasKey("ItemId", "Index"); - - b.ToTable("AttachmentStreamInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Album") - .HasColumnType("text"); - - b.Property("AlbumArtists") - .HasColumnType("text"); - - b.Property("Artists") - .HasColumnType("text"); - - b.Property("Audio") - .HasColumnType("integer"); - - b.Property("ChannelId") - .HasColumnType("text"); - - b.Property("CleanName") - .HasColumnType("text"); - - b.Property("CommunityRating") - .HasColumnType("real"); - - b.Property("CriticRating") - .HasColumnType("real"); - - b.Property("CustomRating") - .HasColumnType("text"); - - b.Property("Data") - .HasColumnType("text"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastMediaAdded") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastRefreshed") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastSaved") - .HasColumnType("timestamp with time zone"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("EpisodeTitle") - .HasColumnType("text"); - - b.Property("ExternalId") - .HasColumnType("text"); - - b.Property("ExternalSeriesId") - .HasColumnType("text"); - - b.Property("ExternalServiceId") - .HasColumnType("text"); - - b.Property("ExtraIds") - .HasColumnType("text"); - - b.Property("ExtraType") - .HasColumnType("integer"); - - b.Property("ForcedSortName") - .HasColumnType("text"); - - b.Property("Genres") - .HasColumnType("text"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("IndexNumber") - .HasColumnType("integer"); - - b.Property("InheritedParentalRatingValue") - .HasColumnType("integer"); - - b.Property("IsFolder") - .HasColumnType("boolean"); - - b.Property("IsInMixedFolder") - .HasColumnType("boolean"); - - b.Property("IsLocked") - .HasColumnType("boolean"); - - b.Property("IsMovie") - .HasColumnType("boolean"); - - b.Property("IsRepeat") - .HasColumnType("boolean"); - - b.Property("IsSeries") - .HasColumnType("boolean"); - - b.Property("IsVirtualItem") - .HasColumnType("boolean"); - - b.Property("LUFS") - .HasColumnType("real"); - - b.Property("MediaType") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("NormalizationGain") - .HasColumnType("real"); - - b.Property("OfficialRating") - .HasColumnType("text"); - - b.Property("OriginalTitle") - .HasColumnType("text"); - - b.Property("Overview") - .HasColumnType("text"); - - b.Property("OwnerId") - .HasColumnType("text"); - - b.Property("ParentId") - .HasColumnType("uuid"); - - b.Property("ParentIndexNumber") - .HasColumnType("integer"); - - b.Property("Path") - .HasColumnType("text"); - - b.Property("PreferredMetadataCountryCode") - .HasColumnType("text"); - - b.Property("PreferredMetadataLanguage") - .HasColumnType("text"); - - b.Property("PremiereDate") - .HasColumnType("timestamp with time zone"); - - b.Property("PresentationUniqueKey") - .HasColumnType("text"); - - b.Property("PrimaryVersionId") - .HasColumnType("text"); - - b.Property("ProductionLocations") - .HasColumnType("text"); - - b.Property("ProductionYear") - .HasColumnType("integer"); - - b.Property("RunTimeTicks") - .HasColumnType("bigint"); - - b.Property("SeasonId") - .HasColumnType("uuid"); - - b.Property("SeasonName") - .HasColumnType("text"); - - b.Property("SeriesId") - .HasColumnType("uuid"); - - b.Property("SeriesName") - .HasColumnType("text"); - - b.Property("SeriesPresentationUniqueKey") - .HasColumnType("text"); - - b.Property("ShowId") - .HasColumnType("text"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("SortName") - .HasColumnType("text"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Studios") - .HasColumnType("text"); - - b.Property("Tagline") - .HasColumnType("text"); - - b.Property("Tags") - .HasColumnType("text"); - - b.Property("TopParentId") - .HasColumnType("uuid"); - - b.Property("TotalBitrate") - .HasColumnType("integer"); - - b.Property("Type") - .IsRequired() - .HasColumnType("text"); - - b.Property("UnratedType") - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("Path"); - - b.HasIndex("PresentationUniqueKey"); - - b.HasIndex("TopParentId", "Id"); - - b.HasIndex("Type", "TopParentId", "Id"); - - b.HasIndex("Type", "TopParentId", "PresentationUniqueKey"); - - b.HasIndex("Type", "TopParentId", "StartDate"); - - b.HasIndex("Id", "Type", "IsFolder", "IsVirtualItem"); - - b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey"); - - b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem"); - - b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName"); - - b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); - - b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated"); - - b.ToTable("BaseItems"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Blurhash") - .HasColumnType("bytea"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("ImageType") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Path") - .IsRequired() - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemImageInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => - { - b.Property("Id") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("Id", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemMetadataFields"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ProviderId") - .HasColumnType("text"); - - b.Property("ProviderValue") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("ItemId", "ProviderId"); - - b.HasIndex("ProviderId", "ProviderValue", "ItemId"); - - b.ToTable("BaseItemProviders"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => - { - b.Property("Id") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("Id", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("BaseItemTrailerTypes"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ChapterIndex") - .HasColumnType("integer"); - - b.Property("ImageDateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("ImagePath") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("StartPositionTicks") - .HasColumnType("bigint"); - - b.HasKey("ItemId", "ChapterIndex"); - - b.ToTable("Chapters"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Key") - .IsRequired() - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemId", "Client", "Key") - .IsUnique(); - - b.ToTable("CustomItemDisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChromecastVersion") - .HasColumnType("integer"); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DashboardTheme") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("EnableNextVideoInfoOverlay") - .HasColumnType("boolean"); - - b.Property("IndexBy") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("ScrollDirection") - .HasColumnType("integer"); - - b.Property("ShowBackdrop") - .HasColumnType("boolean"); - - b.Property("ShowSidebar") - .HasColumnType("boolean"); - - b.Property("SkipBackwardLength") - .HasColumnType("integer"); - - b.Property("SkipForwardLength") - .HasColumnType("integer"); - - b.Property("TvHome") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemId", "Client") - .IsUnique(); - - b.ToTable("DisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DisplayPreferencesId") - .HasColumnType("integer"); - - b.Property("Order") - .HasColumnType("integer"); - - b.Property("Type") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("DisplayPreferencesId"); - - b.ToTable("HomeSection"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("LastModified") - .HasColumnType("timestamp with time zone"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("ImageInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Client") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("IndexBy") - .HasColumnType("integer"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("RememberIndexing") - .HasColumnType("boolean"); - - b.Property("RememberSorting") - .HasColumnType("boolean"); - - b.Property("SortBy") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("ViewType") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("ItemDisplayPreferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => - { - b.Property("ItemValueId") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CleanValue") - .IsRequired() - .HasColumnType("text"); - - b.Property("Type") - .HasColumnType("integer"); - - b.Property("Value") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("ItemValueId"); - - b.HasIndex("Type", "CleanValue") - .IsUnique(); - - b.ToTable("ItemValues"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => - { - b.Property("ItemValueId") - .HasColumnType("uuid"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.HasKey("ItemValueId", "ItemId"); - - b.HasIndex("ItemId"); - - b.ToTable("ItemValuesMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("EndTicks") - .HasColumnType("bigint"); - - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("SegmentProviderId") - .IsRequired() - .HasColumnType("text"); - - b.Property("StartTicks") - .HasColumnType("bigint"); - - b.Property("Type") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.ToTable("MediaSegments"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("StreamIndex") - .HasColumnType("integer"); - - b.Property("AspectRatio") - .HasColumnType("text"); - - b.Property("AverageFrameRate") - .HasColumnType("real"); - - b.Property("BitDepth") - .HasColumnType("integer"); - - b.Property("BitRate") - .HasColumnType("integer"); - - b.Property("BlPresentFlag") - .HasColumnType("integer"); - - b.Property("ChannelLayout") - .HasColumnType("text"); - - b.Property("Channels") - .HasColumnType("integer"); - - b.Property("Codec") - .HasColumnType("text"); - - b.Property("CodecTag") - .HasColumnType("text"); - - b.Property("CodecTimeBase") - .HasColumnType("text"); - - b.Property("ColorPrimaries") - .HasColumnType("text"); - - b.Property("ColorSpace") - .HasColumnType("text"); - - b.Property("ColorTransfer") - .HasColumnType("text"); - - b.Property("Comment") - .HasColumnType("text"); - - b.Property("DvBlSignalCompatibilityId") - .HasColumnType("integer"); - - b.Property("DvLevel") - .HasColumnType("integer"); - - b.Property("DvProfile") - .HasColumnType("integer"); - - b.Property("DvVersionMajor") - .HasColumnType("integer"); - - b.Property("DvVersionMinor") - .HasColumnType("integer"); - - b.Property("ElPresentFlag") - .HasColumnType("integer"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("IsAnamorphic") - .HasColumnType("boolean"); - - b.Property("IsAvc") - .HasColumnType("boolean"); - - b.Property("IsDefault") - .HasColumnType("boolean"); - - b.Property("IsExternal") - .HasColumnType("boolean"); - - b.Property("IsForced") - .HasColumnType("boolean"); - - b.Property("IsHearingImpaired") - .HasColumnType("boolean"); - - b.Property("IsInterlaced") - .HasColumnType("boolean"); - - b.Property("KeyFrames") - .HasColumnType("text"); - - b.Property("Language") - .HasColumnType("text"); - - b.Property("Level") - .HasColumnType("real"); - - b.Property("NalLengthSize") - .HasColumnType("text"); - - b.Property("Path") - .HasColumnType("text"); - - b.Property("PixelFormat") - .HasColumnType("text"); - - b.Property("Profile") - .HasColumnType("text"); - - b.Property("RealFrameRate") - .HasColumnType("real"); - - b.Property("RefFrames") - .HasColumnType("integer"); - - b.Property("Rotation") - .HasColumnType("integer"); - - b.Property("RpuPresentFlag") - .HasColumnType("integer"); - - b.Property("SampleRate") - .HasColumnType("integer"); - - b.Property("StreamType") - .HasColumnType("integer"); - - b.Property("TimeBase") - .HasColumnType("text"); - - b.Property("Title") - .HasColumnType("text"); - - b.Property("Width") - .HasColumnType("integer"); - - b.HasKey("ItemId", "StreamIndex"); - - b.HasIndex("StreamIndex"); - - b.HasIndex("StreamType"); - - b.HasIndex("StreamIndex", "StreamType"); - - b.HasIndex("StreamIndex", "StreamType", "Language"); - - b.ToTable("MediaStreamInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.People", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasColumnType("text"); - - b.Property("PersonType") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("Peoples"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("PeopleId") - .HasColumnType("uuid"); - - b.Property("ListOrder") - .HasColumnType("integer"); - - b.Property("Role") - .HasColumnType("text"); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.HasKey("ItemId", "PeopleId"); - - b.HasIndex("PeopleId"); - - b.HasIndex("ItemId", "ListOrder"); - - b.HasIndex("ItemId", "SortOrder"); - - b.ToTable("PeopleBaseItemMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Kind") - .HasColumnType("integer"); - - b.Property("Permission_Permissions_Guid") - .HasColumnType("uuid"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "Kind") - .IsUnique() - .HasFilter("[UserId] IS NOT NULL"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Kind") - .HasColumnType("integer"); - - b.Property("Preference_Preferences_Guid") - .HasColumnType("uuid"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(65535) - .HasColumnType("character varying(65535)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "Kind") - .IsUnique() - .HasFilter("[UserId] IS NOT NULL"); - - b.ToTable("Preferences"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AccessToken") - .IsRequired() - .HasColumnType("text"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastActivity") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("AccessToken") - .IsUnique(); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AccessToken") - .IsRequired() - .HasColumnType("text"); - - b.Property("AppName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("AppVersion") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DateCreated") - .HasColumnType("timestamp with time zone"); - - b.Property("DateLastActivity") - .HasColumnType("timestamp with time zone"); - - b.Property("DateModified") - .HasColumnType("timestamp with time zone"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("IsActive") - .HasColumnType("boolean"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("DeviceId"); - - b.HasIndex("AccessToken", "DateLastActivity"); - - b.HasIndex("DeviceId", "DateLastActivity"); - - b.HasIndex("UserId", "DeviceId"); - - b.ToTable("Devices"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CustomName") - .HasColumnType("text"); - - b.Property("DeviceId") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("DeviceId") - .IsUnique(); - - b.ToTable("DeviceOptions"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("Width") - .HasColumnType("integer"); - - b.Property("Bandwidth") - .HasColumnType("integer"); - - b.Property("Height") - .HasColumnType("integer"); - - b.Property("Interval") - .HasColumnType("integer"); - - b.Property("ThumbnailCount") - .HasColumnType("integer"); - - b.Property("TileHeight") - .HasColumnType("integer"); - - b.Property("TileWidth") - .HasColumnType("integer"); - - b.HasKey("ItemId", "Width"); - - b.ToTable("TrickplayInfos"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AudioLanguagePreference") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("AuthenticationProviderId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("CastReceiverId") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("DisplayCollectionsView") - .HasColumnType("boolean"); - - b.Property("DisplayMissingEpisodes") - .HasColumnType("boolean"); - - b.Property("EnableAutoLogin") - .HasColumnType("boolean"); - - b.Property("EnableLocalPassword") - .HasColumnType("boolean"); - - b.Property("EnableNextEpisodeAutoPlay") - .HasColumnType("boolean"); - - b.Property("EnableUserPreferenceAccess") - .HasColumnType("boolean"); - - b.Property("HidePlayedInLatest") - .HasColumnType("boolean"); - - b.Property("InternalId") - .HasColumnType("bigint"); - - b.Property("InvalidLoginAttemptCount") - .HasColumnType("integer"); - - b.Property("LastActivityDate") - .HasColumnType("timestamp with time zone"); - - b.Property("LastLoginDate") - .HasColumnType("timestamp with time zone"); - - b.Property("LoginAttemptsBeforeLockout") - .HasColumnType("integer"); - - b.Property("MaxActiveSessions") - .HasColumnType("integer"); - - b.Property("MaxParentalAgeRating") - .HasColumnType("integer"); - - b.Property("MustUpdatePassword") - .HasColumnType("boolean"); - - b.Property("Password") - .HasMaxLength(65535) - .HasColumnType("character varying(65535)"); - - b.Property("PasswordResetProviderId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("PlayDefaultAudioTrack") - .HasColumnType("boolean"); - - b.Property("RememberAudioSelections") - .HasColumnType("boolean"); - - b.Property("RememberSubtitleSelections") - .HasColumnType("boolean"); - - b.Property("RemoteClientBitrateLimit") - .HasColumnType("integer"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .HasColumnType("bigint"); - - b.Property("SubtitleLanguagePreference") - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("SubtitleMode") - .HasColumnType("integer"); - - b.Property("SyncPlayAccess") - .HasColumnType("integer"); - - b.Property("Username") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.HasKey("Id"); - - b.HasIndex("Username") - .IsUnique(); - - b.ToTable("Users"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => - { - b.Property("ItemId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("CustomDataKey") - .HasColumnType("text"); - - b.Property("AudioStreamIndex") - .HasColumnType("integer"); - - b.Property("IsFavorite") - .HasColumnType("boolean"); - - b.Property("LastPlayedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Likes") - .HasColumnType("boolean"); - - b.Property("PlayCount") - .HasColumnType("integer"); - - b.Property("PlaybackPositionTicks") - .HasColumnType("bigint"); - - b.Property("Played") - .HasColumnType("boolean"); - - b.Property("Rating") - .HasColumnType("double precision"); - - b.Property("SubtitleStreamIndex") - .HasColumnType("integer"); - - b.HasKey("ItemId", "UserId", "CustomDataKey"); - - b.HasIndex("UserId"); - - b.HasIndex("ItemId", "UserId", "IsFavorite"); - - b.HasIndex("ItemId", "UserId", "LastPlayedDate"); - - b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks"); - - b.HasIndex("ItemId", "UserId", "Played"); - - b.ToTable("UserData"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("AccessSchedules") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Children") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem") - .WithMany("ParentAncestors") - .HasForeignKey("ParentItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("ParentItem"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany() - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Images") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("LockedFields") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Provider") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("TrailerTypes") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Chapters") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("DisplayPreferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b => - { - b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null) - .WithMany("HomeSections") - .HasForeignKey("DisplayPreferencesId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithOne("ProfileImage") - .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("ItemDisplayPreferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("ItemValues") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue") - .WithMany("BaseItemsMap") - .HasForeignKey("ItemValueId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("ItemValue"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("MediaStreams") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("Peoples") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.People", "People") - .WithMany("BaseItems") - .HasForeignKey("PeopleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("People"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("Permissions") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b => - { - b.HasOne("Jellyfin.Data.Entities.User", null) - .WithMany("Preferences") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b => - { - b.HasOne("Jellyfin.Data.Entities.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b => - { - b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item") - .WithMany("UserData") - .HasForeignKey("ItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jellyfin.Data.Entities.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Item"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b => - { - b.Navigation("Chapters"); - - b.Navigation("Children"); - - b.Navigation("Images"); - - b.Navigation("ItemValues"); - - b.Navigation("LockedFields"); - - b.Navigation("MediaStreams"); - - b.Navigation("ParentAncestors"); - - b.Navigation("Peoples"); - - b.Navigation("Provider"); - - b.Navigation("TrailerTypes"); - - b.Navigation("UserData"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b => - { - b.Navigation("HomeSections"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b => - { - b.Navigation("BaseItemsMap"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.People", b => - { - b.Navigation("BaseItems"); - }); - - modelBuilder.Entity("Jellyfin.Data.Entities.User", b => - { - b.Navigation("AccessSchedules"); - - b.Navigation("DisplayPreferences"); - - b.Navigation("ItemDisplayPreferences"); - - b.Navigation("Permissions"); - - b.Navigation("Preferences"); - - b.Navigation("ProfileImage"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs deleted file mode 100644 index bf949d570b..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Migrations/PgSqlDesignTimeJellyfinDbFactory.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Jellyfin.Server.Implementations; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Logging.Abstractions; - -namespace Jellyfin.Database.Providers.PgSql -{ - /// - /// The design time factory for . - /// This is only used for the creation of migrations and not during runtime. - /// - internal sealed class PgSqlDesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory - { - public JellyfinDbContext CreateDbContext(string[] args) - { - var optionsBuilder = new DbContextOptionsBuilder(); - optionsBuilder.UseNpgsql(f => f.MigrationsAssembly(GetType().Assembly)); - - return new JellyfinDbContext( - optionsBuilder.Options, - NullLogger.Instance, - new PgSqlDatabaseProvider(null!, NullLogger.Instance)); - } - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs deleted file mode 100644 index ccaf38d2ac..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/PgSqlDatabaseProvider.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Diagnostics; -using System.Reflection; -using Jellyfin.Server.Implementations; -using Jellyfin.Server.Implementations.DatabaseConfiguration; -using MediaBrowser.Common.Configuration; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Logging; -using Npgsql; - -namespace Jellyfin.Database.Providers.PgSql; - -/// -/// Configures jellyfin to use an Postgres database. -/// -[JellyfinDatabaseProviderKey("Jellyfin-PgSql")] -public sealed class PgSqlDatabaseProvider : IJellyfinDatabaseProvider -{ - private readonly IConfigurationManager _configurationManager; - private readonly ILogger _logger; - - /// - /// Initializes a new instance of the class. - /// - /// Configuration manager to get PgSQL connection data. - /// A logger. - public PgSqlDatabaseProvider(IConfigurationManager configurationManager, ILogger logger) - { - _configurationManager = configurationManager; - _logger = logger; - } - - /// - public IDbContextFactory? DbContextFactory { get; set; } - - /// - public void Initialise(DbContextOptionsBuilder options) - { - var dbSettings = _configurationManager.GetConfiguration("database"); - - if (dbSettings.PostgreSql is null) - { - throw new InvalidOperationException("Selected PgSQL as database provider but did not provide required configuration. Please see docs."); - } - - var connectionBuilder = new NpgsqlConnectionStringBuilder(); - connectionBuilder.ApplicationName = $"jellyfin+{FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly()!.Location).FileVersion}"; - connectionBuilder.CommandTimeout = dbSettings.PostgreSql.Timeout; - connectionBuilder.Database = dbSettings.PostgreSql.DatabaseName; - connectionBuilder.Username = dbSettings.PostgreSql.Username; - connectionBuilder.Password = dbSettings.PostgreSql.Password; - connectionBuilder.Host = dbSettings.PostgreSql.ServerName; - connectionBuilder.Port = dbSettings.PostgreSql.Port; - - var connectionString = connectionBuilder.ToString(); - - options - .UseNpgsql(connectionString, pgSqlOptions => pgSqlOptions.MigrationsAssembly(GetType().Assembly)); - } - - /// - public Task RunScheduledOptimisation(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } - - /// - public void OnModelCreating(ModelBuilder modelBuilder) - { - } - - /// - public Task RunShutdownTask(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs b/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs deleted file mode 100644 index 27022c7de8..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.PgSql/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Jellyfin.Database.Providers.PgSql")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Jellyfin Project")] -[assembly: AssemblyProduct("Jellyfin Server")] -[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] -[assembly: InternalsVisibleTo("Jellyfin.Server.Implementations.Tests")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 1dd7cfe045..9bf67118d0 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Reflection; -using Jellyfin.Database.Providers.PgSql; using Jellyfin.Database.Providers.SqLite; using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; @@ -23,7 +20,6 @@ public static class ServiceCollectionExtensions private static IEnumerable DatabaseProviderTypes() { yield return typeof(SqliteDatabaseProvider); - yield return typeof(PgSqlDatabaseProvider); } private static IDictionary GetSupportedDbProviders() diff --git a/Jellyfin.sln b/Jellyfin.sln index e6642c296d..5bc1b6ef8a 100644 --- a/Jellyfin.sln +++ b/Jellyfin.sln @@ -89,9 +89,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv", "src\Jell EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.SqLite", "Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.PgSql", "Jellyfin.Database\Jellyfin.Database.Providers.PgSql\Jellyfin.Database.Providers.PgSql.csproj", "{EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Providers.SqLite", "Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Implementations", "Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj", "{8C9F9221-8415-496C-B1F5-E7756F03FA59}" EndProject @@ -253,10 +251,6 @@ Global {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Debug|Any CPU.Build.0 = Debug|Any CPU {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Release|Any CPU.ActiveCfg = Release|Any CPU {A5590358-33CC-4B39-BDE7-DC62FEB03C76}.Release|Any CPU.Build.0 = Release|Any CPU - {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C}.Release|Any CPU.Build.0 = Release|Any CPU {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Debug|Any CPU.Build.0 = Debug|Any CPU {8C9F9221-8415-496C-B1F5-E7756F03FA59}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -290,7 +284,6 @@ Global {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {8C6B2B13-58A4-4506-9DAB-1F882A093FE0} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {A5590358-33CC-4B39-BDE7-DC62FEB03C76} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} - {EC91A604-C99E-44E2-BB74-B4EB2A4B6A0C} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} {8C9F9221-8415-496C-B1F5-E7756F03FA59} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs index 78e431be14..3fe2caca79 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs @@ -1,6 +1,3 @@ -using System; -using System.Threading.Tasks; -using Jellyfin.Database.Providers.PgSql; using Jellyfin.Server.Implementations.Migrations; using Microsoft.EntityFrameworkCore; using Xunit; @@ -9,14 +6,6 @@ namespace Jellyfin.Server.Implementations.Tests.EfMigrations; public class EfMigrationTests { - [Fact] - public void CheckForUnappliedMigrations_PgSQL() - { - var dbDesignContext = new PgSqlDesignTimeJellyfinDbFactory(); - var context = dbDesignContext.CreateDbContext([]); - Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EFCore model for PgSQL. Please create a Migration."); - } - [Fact] public void CheckForUnappliedMigrations_SqLite() { From f07e1f4aaee9b61b07d1389107973ead146c639b Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 19 Feb 2025 18:30:18 +0000 Subject: [PATCH 20/34] Reverted Comparison code for name check --- Jellyfin.Api/Controllers/UserController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Api/Controllers/UserController.cs b/Jellyfin.Api/Controllers/UserController.cs index 88e5d46adc..838578fab8 100644 --- a/Jellyfin.Api/Controllers/UserController.cs +++ b/Jellyfin.Api/Controllers/UserController.cs @@ -390,7 +390,7 @@ public class UserController : BaseJellyfinApiController return StatusCode(StatusCodes.Status403Forbidden, "User update not allowed."); } - if (!string.Equals(user.Username, updateUser.Name, StringComparison.OrdinalIgnoreCase)) + if (!string.Equals(user.Username, updateUser.Name, StringComparison.Ordinal)) { await _userManager.RenameUser(user, updateUser.Name).ConfigureAwait(false); } From 44dfe554a894561d3878c8f204d989e4d5a72d72 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 20 Feb 2025 09:55:02 +0000 Subject: [PATCH 21/34] Moved Database projects under /src removed old pgsql references --- .devcontainer/pgsql/Dockerfile | 8 --- .devcontainer/pgsql/devcontainer.json | 47 ---------------- .devcontainer/pgsql/docker-compose.yaml | 48 ---------------- .gitignore | 2 - Jellyfin.Data/Jellyfin.Data.csproj | 2 +- .../DbConfiguration/PostgreSqlOptions.cs | 39 ------------- .../Jellyfin.Database.Providers.SqLite.csproj | 55 ------------------- .../Jellyfin.Server.Implementations.csproj | 5 +- Jellyfin.sln | 7 ++- .../DatabaseConfigurationOptions.cs | 5 -- .../Entities/AccessSchedule.cs | 0 .../Entities/ActivityLog.cs | 0 .../Entities/AncestorId.cs | 0 .../Entities/AttachmentStreamInfo.cs | 0 .../Entities/BaseItemEntity.cs | 0 .../Entities/BaseItemExtraType.cs | 0 .../Entities/BaseItemImageInfo.cs | 0 .../Entities/BaseItemMetadataField.cs | 0 .../Entities/BaseItemProvider.cs | 0 .../Entities/BaseItemTrailerType.cs | 0 .../Entities/Chapter.cs | 0 .../Entities/CustomItemDisplayPreferences.cs | 0 .../Entities/DisplayPreferences.cs | 0 .../Entities/Group.cs | 0 .../Entities/HomeSection.cs | 0 .../Entities/ImageInfo.cs | 0 .../Entities/ImageInfoImageType.cs | 0 .../Entities/ItemDisplayPreferences.cs | 0 .../Entities/ItemValue.cs | 0 .../Entities/ItemValueMap.cs | 0 .../Entities/ItemValueType.cs | 0 .../Entities/Libraries/Artwork.cs | 0 .../Entities/Libraries/Book.cs | 0 .../Entities/Libraries/BookMetadata.cs | 0 .../Entities/Libraries/Chapter.cs | 0 .../Entities/Libraries/Collection.cs | 0 .../Entities/Libraries/CollectionItem.cs | 0 .../Entities/Libraries/Company.cs | 0 .../Entities/Libraries/CompanyMetadata.cs | 0 .../Entities/Libraries/CustomItem.cs | 0 .../Entities/Libraries/CustomItemMetadata.cs | 0 .../Entities/Libraries/Episode.cs | 0 .../Entities/Libraries/EpisodeMetadata.cs | 0 .../Entities/Libraries/Genre.cs | 0 .../Entities/Libraries/ItemMetadata.cs | 0 .../Entities/Libraries/Library.cs | 0 .../Entities/Libraries/LibraryItem.cs | 0 .../Entities/Libraries/MediaFile.cs | 0 .../Entities/Libraries/MediaFileStream.cs | 0 .../Entities/Libraries/MetadataProvider.cs | 0 .../Entities/Libraries/MetadataProviderId.cs | 0 .../Entities/Libraries/Movie.cs | 0 .../Entities/Libraries/MovieMetadata.cs | 0 .../Entities/Libraries/MusicAlbum.cs | 0 .../Entities/Libraries/MusicAlbumMetadata.cs | 0 .../Entities/Libraries/Person.cs | 0 .../Entities/Libraries/PersonRole.cs | 0 .../Entities/Libraries/Photo.cs | 0 .../Entities/Libraries/PhotoMetadata.cs | 0 .../Entities/Libraries/Rating.cs | 0 .../Entities/Libraries/RatingSource.cs | 0 .../Entities/Libraries/Release.cs | 0 .../Entities/Libraries/Season.cs | 0 .../Entities/Libraries/SeasonMetadata.cs | 0 .../Entities/Libraries/Series.cs | 0 .../Entities/Libraries/SeriesMetadata.cs | 0 .../Entities/Libraries/Track.cs | 0 .../Entities/Libraries/TrackMetadata.cs | 0 .../Entities/MediaSegment.cs | 0 .../Entities/MediaStreamInfo.cs | 0 .../Entities/MediaStreamTypeEntity.cs | 0 .../Entities/People.cs | 0 .../Entities/PeopleBaseItemMap.cs | 0 .../Entities/Permission.cs | 0 .../Entities/Preference.cs | 0 .../Entities/ProgramAudioEntity.cs | 0 .../Entities/Security/ApiKey.cs | 0 .../Entities/Security/Device.cs | 0 .../Entities/Security/DeviceOptions.cs | 0 .../Entities/TrickplayInfo.cs | 0 .../Entities/User.cs | 0 .../Entities/UserData.cs | 0 .../Enums/ArtKind.cs | 0 .../Enums/ChromecastVersion.cs | 0 .../Enums/DynamicDayOfWeek.cs | 0 .../Enums/HomeSectionType.cs | 0 .../Enums/IndexingKind.cs | 0 .../Enums/MediaFileKind.cs | 0 .../Enums/MediaSegmentType.cs | 0 .../Enums/PermissionKind.cs | 0 .../Enums/PersonRoleType.cs | 0 .../Enums/PreferenceKind.cs | 0 .../Enums/ScrollDirection.cs | 0 .../Enums/SortOrder.cs | 0 .../Enums/SubtitlePlaybackMode.cs | 0 .../Enums/SyncPlayUserAccessType.cs | 0 .../Enums/ViewType.cs | 0 .../IJellyfinDatabaseProvider.cs | 0 .../Interfaces/IHasArtwork.cs | 0 .../Interfaces/IHasCompanies.cs | 0 .../Interfaces/IHasConcurrencyToken.cs | 0 .../Interfaces/IHasPermissions.cs | 0 .../Interfaces/IHasReleases.cs | 0 .../Jellyfin.Database.Implementations.csproj | 25 +++++++++ .../JellyfinDatabaseProviderKeyAttribute.cs | 0 .../JellyfinDbContext.cs | 0 .../ActivityLogConfiguration.cs | 0 .../AncestorIdConfiguration.cs | 0 .../ModelConfiguration/ApiKeyConfiguration.cs | 0 .../AttachmentStreamInfoConfiguration.cs | 0 .../BaseItemConfiguration.cs | 0 .../BaseItemMetadataFieldConfiguration.cs | 0 .../BaseItemProviderConfiguration.cs | 0 .../BaseItemTrailerTypeConfiguration.cs | 0 .../ChapterConfiguration.cs | 0 ...stomItemDisplayPreferencesConfiguration.cs | 0 .../ModelConfiguration/DeviceConfiguration.cs | 0 .../DeviceOptionsConfiguration.cs | 0 .../DisplayPreferencesConfiguration.cs | 0 .../ItemValuesConfiguration.cs | 0 .../ItemValuesMapConfiguration.cs | 0 .../MediaStreamInfoConfiguration.cs | 0 .../PeopleBaseItemMapConfiguration.cs | 0 .../ModelConfiguration/PeopleConfiguration.cs | 0 .../PermissionConfiguration.cs | 0 .../PreferenceConfiguration.cs | 0 .../TrickplayInfoConfiguration.cs | 0 .../ModelConfiguration/UserConfiguration.cs | 0 .../UserDataConfiguration.cs | 0 .../Jellyfin.Database.Providers.SqLite.csproj | 34 +++++------- .../Migrations/.gitattributes | 0 .../20200514181226_AddActivityLog.Designer.cs | 0 .../20200514181226_AddActivityLog.cs | 0 .../20200613202153_AddUsers.Designer.cs | 0 .../Migrations/20200613202153_AddUsers.cs | 0 ...28005145_AddDisplayPreferences.Designer.cs | 0 .../20200728005145_AddDisplayPreferences.cs | 0 ...533_FixDisplayPreferencesIndex.Designer.cs | 0 ...200905220533_FixDisplayPreferencesIndex.cs | 0 ...004171403_AddMaxActiveSessions.Designer.cs | 0 .../20201004171403_AddMaxActiveSessions.cs | 0 ...55_AddCustomDisplayPreferences.Designer.cs | 0 ...01204223655_AddCustomDisplayPreferences.cs | 0 ...181425_AddIndexesAndCollations.Designer.cs | 0 .../20210320181425_AddIndexesAndCollations.cs | 0 ...110544_NullableCustomPrefValue.Designer.cs | 0 .../20210407110544_NullableCustomPrefValue.cs | 0 .../20210814002109_AddDevices.Designer.cs | 0 .../Migrations/20210814002109_AddDevices.cs | 0 ...ddIndexActivityLogsDateCreated.Designer.cs | 0 ...2080052_AddIndexActivityLogsDateCreated.cs | 0 ...30526173516_RemoveEasyPassword.Designer.cs | 0 .../20230526173516_RemoveEasyPassword.cs | 0 ...230626233818_AddTrickplayInfos.Designer.cs | 0 .../20230626233818_AddTrickplayInfos.cs | 0 ...0230923170422_UserCastReceiver.Designer.cs | 0 .../20230923170422_UserCastReceiver.cs | 0 ...0240729140605_AddMediaSegments.Designer.cs | 0 .../20240729140605_AddMediaSegments.cs | 0 ...rkSegmentProviderIdNonNullable.Designer.cs | 0 ...082930_MarkSegmentProviderIdNonNullable.cs | 0 ...41020103111_LibraryDbMigration.Designer.cs | 0 .../20241020103111_LibraryDbMigration.cs | 0 ...41111131257_AddedCustomDataKey.Designer.cs | 0 .../20241111131257_AddedCustomDataKey.cs | 0 ...11135439_AddedCustomDataKeyKey.Designer.cs | 0 .../20241111135439_AddedCustomDataKeyKey.cs | 0 ...1112152323_FixAncestorIdConfig.Designer.cs | 0 .../20241112152323_FixAncestorIdConfig.cs | 0 ...20241112232041_fixMediaStreams.Designer.cs | 0 .../20241112232041_fixMediaStreams.cs | 0 ...0241112234144_FixMediaStreams2.Designer.cs | 0 .../20241112234144_FixMediaStreams2.cs | 0 ...3133548_EnforceUniqueItemValue.Designer.cs | 0 .../20241113133548_EnforceUniqueItemValue.cs | 0 .../20250202021306_FixedCollation.Designer.cs | 0 .../20250202021306_FixedCollation.cs | 0 ...92455_MakeStartEndDateNullable.Designer.cs | 0 ...20250204092455_MakeStartEndDateNullable.cs | 0 .../20250214031148_ChannelIdGuid.Designer.cs | 0 .../20250214031148_ChannelIdGuid.cs | 0 .../Migrations/JellyfinDbModelSnapshot.cs | 0 .../SqliteDesignTimeJellyfinDbFactory.cs | 0 .../ModelBuilderExtensions.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../SqliteDatabaseProvider.cs | 3 + .../DateTimeKindValueConverter.cs | 0 .../Jellyfin.Database}/readme.md | 0 188 files changed, 49 insertions(+), 231 deletions(-) delete mode 100644 .devcontainer/pgsql/Dockerfile delete mode 100644 .devcontainer/pgsql/devcontainer.json delete mode 100644 .devcontainer/pgsql/docker-compose.yaml delete mode 100644 Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs delete mode 100644 Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs (69%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ActivityLog.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/AncestorId.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Chapter.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Group.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/HomeSection.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ImageInfo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ItemValue.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ItemValueType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/MediaSegment.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/People.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Permission.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Preference.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Security/Device.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/User.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Entities/UserData.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/ArtKind.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/IndexingKind.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/PermissionKind.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/SortOrder.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Enums/ViewType.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs (100%) create mode 100644 src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/JellyfinDbContext.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs (100%) rename Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj => src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj (50%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs (97%) rename {Jellyfin.Database => src/Jellyfin.Database}/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs (100%) rename {Jellyfin.Database => src/Jellyfin.Database}/readme.md (100%) diff --git a/.devcontainer/pgsql/Dockerfile b/.devcontainer/pgsql/Dockerfile deleted file mode 100644 index ff7f3bcd79..0000000000 --- a/.devcontainer/pgsql/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment this line to install global node packages. -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/pgsql/devcontainer.json b/.devcontainer/pgsql/devcontainer.json deleted file mode 100644 index 3dd91d9755..0000000000 --- a/.devcontainer/pgsql/devcontainer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "Development Jellyfin Server", - "dockerComposeFile": "docker-compose.yaml", - "service": "app", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - // restores nuget packages, installs the dotnet workloads and installs the dev https certificate - "postStartCommand": "sudo dotnet restore; sudo dotnet workload update; sudo dotnet dev-certs https --trust; sudo bash \"./.devcontainer/install-ffmpeg.sh\"", - // reads the extensions list and installs them - "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", - "forwardPorts": [ - "pgadmin:8081" - ], - "portsAttributes": { - "8081": { - "label": "pgAdmin", - "onAutoForward": "notify", - "requireLocalPort": true - }, - "8096": { - "label": "jellyfinapi", - "onAutoForward": "notify", - "requireLocalPort": true - } - }, - "features": { - "ghcr.io/devcontainers/features/dotnet:2": { - "version": "none", - "dotnetRuntimeVersions": "9.0", - "aspNetCoreRuntimeVersions": "9.0" - }, - "ghcr.io/devcontainers-contrib/features/apt-packages:1": { - "preserve_apt_list": false, - "packages": [ - "libfontconfig1" - ] - }, - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "dockerDashComposeVersion": "v2" - }, - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {} - }, - "hostRequirements": { - "memory": "8gb", - "cpus": 4 - } -} diff --git a/.devcontainer/pgsql/docker-compose.yaml b/.devcontainer/pgsql/docker-compose.yaml deleted file mode 100644 index 45af0b33e1..0000000000 --- a/.devcontainer/pgsql/docker-compose.yaml +++ /dev/null @@ -1,48 +0,0 @@ -version: '3.8' - -services: - app: - build: - context: . - dockerfile: Dockerfile - - volumes: - - ../../..:/workspaces:cached - - # Overrides default command so things don't shut down after the process ends. - command: sleep infinity - - # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. - network_mode: service:pgadmin - # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - # user: root - - # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - - db: - image: postgres:17.2 - restart: unless-stopped - volumes: - - ./pgdata:/var/lib/postgresql/data - environment: - POSTGRES_PASSWORD: jellyfin - POSTGRES_USER: jellyfin - POSTGRES_DB: Jellyfin - pgadmin: - image: dpage/pgadmin4 - restart: unless-stopped - volumes: - - ./pgadmin:/pgadmin - - pgadmin-data:/var/lib/pgadmin - environment: - - PGADMIN_DEFAULT_EMAIL=user@domain.com - - PGADMIN_DEFAULT_PASSWORD=SuperSecret - - PGADMIN_LISTEN_PORT=8081 - - PGADMIN_SERVER_JSON_FILE=/pgadmin/servers.json - - PGADMIN_CONFIG_SERVER_MODE=False - # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - -volumes: - pgadmin-data: diff --git a/.gitignore b/.gitignore index fe312b647c..d5a0367bff 100644 --- a/.gitignore +++ b/.gitignore @@ -277,5 +277,3 @@ apiclient/generated # Omnisharp crash logs mono_crash.*.json - -.devcontainer/pgsql/pgdata \ No newline at end of file diff --git a/Jellyfin.Data/Jellyfin.Data.csproj b/Jellyfin.Data/Jellyfin.Data.csproj index 432f1846e5..45374c22f7 100644 --- a/Jellyfin.Data/Jellyfin.Data.csproj +++ b/Jellyfin.Data/Jellyfin.Data.csproj @@ -39,7 +39,7 @@ - + diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs b/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs deleted file mode 100644 index 1f7c30b098..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/PostgreSqlOptions.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; - -namespace Jellyfin.Server.Implementations.DatabaseConfiguration; - -/// -/// Options specific to run jellyfin on a postgreSql database. -/// -public class PostgreSqlOptions -{ - /// - /// Gets or Sets the Port. Defaults to 5432. - /// - public required int Port { get; set; } = 5432; - - /// - /// Gets or Sets the Server name. - /// - public required string ServerName { get; set; } - - /// - /// Gets or Sets the username. - /// - public required string Username { get; set; } - - /// - /// Gets or Sets the password. - /// - public required string Password { get; set; } - - /// - /// Gets or Sets the database name. Defaults to "Jellyfin". - /// - public string DatabaseName { get; set; } = "Jellyfin"; - - /// - /// Gets or Sets the timeout in secounds before a running command is terminated. Defaults to 30. - /// - public int Timeout { get; set; } = 30; -} diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj b/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj deleted file mode 100644 index fca872d902..0000000000 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - - net9.0 - enable - enable - false - true - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index 01d9dcf64d..e73f87d39e 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -35,9 +35,8 @@ - - - + + diff --git a/Jellyfin.sln b/Jellyfin.sln index 5bc1b6ef8a..78f7cce09e 100644 --- a/Jellyfin.sln +++ b/Jellyfin.sln @@ -87,11 +87,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv.Tests", "te EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv", "src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj", "{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "src\Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Providers.SqLite", "Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Providers.SqLite", "src\Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Implementations", "Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj", "{8C9F9221-8415-496C-B1F5-E7756F03FA59}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Implementations", "src\Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj", "{8C9F9221-8415-496C-B1F5-E7756F03FA59}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -283,6 +283,7 @@ Global {24960660-DE6C-47BF-AEEF-CEE8F19FE6C2} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {C4F71272-C6BE-4C30-BE0D-4E6ED651D6D3} = {FBBB5129-006E-4AD7-BAD5-8B7CA1D10ED6} {8C6B2B13-58A4-4506-9DAB-1F882A093FE0} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} + {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} = {C9F0AB5D-F4D7-40C8-A353-3305C86D6D4C} {A5590358-33CC-4B39-BDE7-DC62FEB03C76} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} {8C9F9221-8415-496C-B1F5-E7756F03FA59} = {4C54CE05-69C8-48FA-8785-39F7F6DB1CAD} EndGlobalSection diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs similarity index 69% rename from Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs index d49d8536a3..af2ede7010 100644 --- a/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs @@ -11,9 +11,4 @@ public class DatabaseConfigurationOptions /// Gets or Sets the type of database jellyfin should use. /// public required string DatabaseType { get; set; } - - /// - /// Gets or Sets the settings to run jellyfin with Postgres. - /// - public PostgreSqlOptions? PostgreSql { get; set; } } diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj new file mode 100644 index 0000000000..3b619cce61 --- /dev/null +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + false + true + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj similarity index 50% rename from Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj index 96cea69dfc..4e5f63f6fe 100644 --- a/Jellyfin.Database/Jellyfin.Database.Implementations/Jellyfin.Database.Implementations.csproj +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj @@ -2,33 +2,16 @@ net9.0 - enable - enable false true - - - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - + + + all @@ -40,4 +23,15 @@ + + + + + + + + + + + diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs similarity index 97% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs index ef4f00384b..f7fde4989e 100644 --- a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs @@ -1,4 +1,7 @@ using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; using Jellyfin.Server.Implementations; using MediaBrowser.Common.Configuration; using Microsoft.Data.Sqlite; diff --git a/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs similarity index 100% rename from Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs diff --git a/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md similarity index 100% rename from Jellyfin.Database/readme.md rename to src/Jellyfin.Database/readme.md From 69e3e4c468c87d5802e470977ade40340297f3e0 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 20 Feb 2025 09:59:21 +0000 Subject: [PATCH 22/34] Fixed readme for migrations --- src/Jellyfin.Database/readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md index 55d57d3eff..a0f8cefc4a 100644 --- a/src/Jellyfin.Database/readme.md +++ b/src/Jellyfin.Database/readme.md @@ -2,7 +2,7 @@ This shall provide context on how to work with entity frameworks multi provider migration feature. -Jellyfin supports multiple database providers, namely SqLite as its default and the experimental postgresSQL. +Jellyfin will in the future support multiple database providers, namely SqLite as its default and the experimental postgresSQL. Each provider has its own set of migrations, as they contain provider specific instructions to migrate the specific changes to their respective systems. @@ -12,13 +12,12 @@ When creating a new migration, you always have to create migrations for all prov dotnet ef migrations add MIGRATION_NAME --project "PATH_TO_PROJECT" -- --provider PROVIDER_KEY ``` -with both sqlite and pgsql currently beeing supported and both need migrations, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. +with sqlite currently beeing supported and, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin` ```cmd dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SQLite -dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.PgSql" -- --migration-provider Jellyfin-PgSql ``` If you get the error: `Run "dotnet tool restore" to make the "dotnet-ef" command available.` Run `dotnet restore`. From 3e223ead1e44559f3bd06ad4d00b43c57c86b6b5 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 20 Feb 2025 10:02:47 +0000 Subject: [PATCH 23/34] Fixed references for database projects --- Jellyfin.Server/Jellyfin.Server.csproj | 2 +- .../Jellyfin.Server.Implementations.Tests.csproj | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index bd094d6914..452b03efbe 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -66,7 +66,7 @@ - + diff --git a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj index 84a3951f67..b54e2baf6a 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj +++ b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj @@ -29,9 +29,8 @@ - - - + + From 05f5d19ff45efe1a30a2e33e9aa2366788e8abb9 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 20 Feb 2025 19:56:59 +0000 Subject: [PATCH 24/34] fixed new project paths --- .../Emby.Server.Implementations.csproj | 2 +- src/Jellyfin.Database/readme.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index c94ff924c5..8f89f35ac9 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md index a0f8cefc4a..dc1479897d 100644 --- a/src/Jellyfin.Database/readme.md +++ b/src/Jellyfin.Database/readme.md @@ -12,14 +12,14 @@ When creating a new migration, you always have to create migrations for all prov dotnet ef migrations add MIGRATION_NAME --project "PATH_TO_PROJECT" -- --provider PROVIDER_KEY ``` -with sqlite currently beeing supported and, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. +with sqlite currently being the only supported provider, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin` ```cmd -dotnet ef migrations add {MIGRATION_NAME} --project "Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SQLite +dotnet ef migrations add {MIGRATION_NAME} --project "src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SQLite ``` If you get the error: `Run "dotnet tool restore" to make the "dotnet-ef" command available.` Run `dotnet restore`. -in the event that you get the error: `System.UnauthorizedAccessException: Access to the path '/Jellyfin.Database' is denied.` you have to restore as sudo and then run `ef migrations` as sudo too. +in the event that you get the error: `System.UnauthorizedAccessException: Access to the path '/src/Jellyfin.Database' is denied.` you have to restore as sudo and then run `ef migrations` as sudo too. From a6b4d124d71c0bbb9dff5f226e65875e03384ab4 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sat, 1 Mar 2025 14:16:02 +0000 Subject: [PATCH 25/34] Replicated changes made from #13492 --- .../IJellyfinDatabaseProvider.cs | 6 ++++++ .../JellyfinDbContext.cs | 7 +++++++ .../DoNotUseReturningClauseConvention.cs | 20 +++++++++++++++++++ .../SqliteDatabaseProvider.cs | 6 ++++++ 4 files changed, 39 insertions(+) create mode 100644 src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/DoNotUseReturningClauseConvention.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs index b27a88971d..cc96792e64 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -27,6 +27,12 @@ public interface IJellyfinDatabaseProvider /// The ModelBuilder from EFCore. void OnModelCreating(ModelBuilder modelBuilder); + /// + /// Will be invoked when EFCore wants to configure its model. + /// + /// The ModelConfigurationBuilder from EFCore. + void ConfigureConventions(ModelConfigurationBuilder configurationBuilder); + /// /// If supported this should run any periodic maintaince tasks. /// diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs index a0a0f2d0ee..c65006c7d8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs @@ -272,4 +272,11 @@ public class JellyfinDbContext(DbContextOptions options, ILog // Configuration for each entity is in its own class inside 'ModelConfiguration'. modelBuilder.ApplyConfigurationsFromAssembly(typeof(JellyfinDbContext).Assembly); } + + /// + protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) + { + jellyfinDatabaseProvider.ConfigureConventions(configurationBuilder); + base.ConfigureConventions(configurationBuilder); + } } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/DoNotUseReturningClauseConvention.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/DoNotUseReturningClauseConvention.cs new file mode 100644 index 0000000000..1ce2420e43 --- /dev/null +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/DoNotUseReturningClauseConvention.cs @@ -0,0 +1,20 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.EntityFrameworkCore.Metadata.Conventions; + +namespace Jellyfin.Database.Providers.SqLite; + +internal class DoNotUseReturningClauseConvention : IModelFinalizingConvention +{ + /// + public void ProcessModelFinalizing( + IConventionModelBuilder modelBuilder, + IConventionContext context) + { + foreach (var entityType in modelBuilder.Metadata.GetEntityTypes()) + { + entityType.UseSqlReturningClause(false); + } + } +} diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs index f7fde4989e..2364186b12 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs @@ -78,4 +78,10 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider SqliteConnection.ClearAllPools(); } + + /// + public void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Conventions.Add(_ => new DoNotUseReturningClauseConvention()); + } } From 3c2d3ac18b6c4c29c340ea8bb3f1dcafe557904b Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 24 Mar 2025 09:19:00 +0100 Subject: [PATCH 26/34] Update src/Jellyfin.Database/readme.md Co-authored-by: Tim Eisele --- src/Jellyfin.Database/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md index dc1479897d..d50636b779 100644 --- a/src/Jellyfin.Database/readme.md +++ b/src/Jellyfin.Database/readme.md @@ -2,7 +2,7 @@ This shall provide context on how to work with entity frameworks multi provider migration feature. -Jellyfin will in the future support multiple database providers, namely SqLite as its default and the experimental postgresSQL. +Jellyfin will support multiple database providers in the future, namely SqLite as its default and the experimental postgresSQL. Each provider has its own set of migrations, as they contain provider specific instructions to migrate the specific changes to their respective systems. From ea8f1ffb7c9d47d6ccfadd2e0ab9645f69e2e446 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 24 Mar 2025 10:07:52 +0000 Subject: [PATCH 27/34] renamed SqLite to Sqlite --- .vscode/settings.json | 3 +++ .../Extensions/ServiceCollectionExtensions.cs | 4 ++-- .../Jellyfin.Server.Implementations.csproj | 1 - Jellyfin.Server/Program.cs | 2 +- Jellyfin.sln | 2 +- .../DoNotUseReturningClauseConvention.cs | 0 .../Jellyfin.Database.Providers.Sqlite.csproj} | 0 .../Migrations/.gitattributes | 0 .../Migrations/20200514181226_AddActivityLog.Designer.cs | 0 .../Migrations/20200514181226_AddActivityLog.cs | 0 .../Migrations/20200613202153_AddUsers.Designer.cs | 0 .../Migrations/20200613202153_AddUsers.cs | 0 .../20200728005145_AddDisplayPreferences.Designer.cs | 0 .../Migrations/20200728005145_AddDisplayPreferences.cs | 0 .../20200905220533_FixDisplayPreferencesIndex.Designer.cs | 0 .../Migrations/20200905220533_FixDisplayPreferencesIndex.cs | 0 .../20201004171403_AddMaxActiveSessions.Designer.cs | 0 .../Migrations/20201004171403_AddMaxActiveSessions.cs | 0 .../20201204223655_AddCustomDisplayPreferences.Designer.cs | 0 .../Migrations/20201204223655_AddCustomDisplayPreferences.cs | 0 .../20210320181425_AddIndexesAndCollations.Designer.cs | 0 .../Migrations/20210320181425_AddIndexesAndCollations.cs | 0 .../20210407110544_NullableCustomPrefValue.Designer.cs | 0 .../Migrations/20210407110544_NullableCustomPrefValue.cs | 0 .../Migrations/20210814002109_AddDevices.Designer.cs | 0 .../Migrations/20210814002109_AddDevices.cs | 0 ...20221022080052_AddIndexActivityLogsDateCreated.Designer.cs | 0 .../20221022080052_AddIndexActivityLogsDateCreated.cs | 0 .../Migrations/20230526173516_RemoveEasyPassword.Designer.cs | 0 .../Migrations/20230526173516_RemoveEasyPassword.cs | 0 .../Migrations/20230626233818_AddTrickplayInfos.Designer.cs | 0 .../Migrations/20230626233818_AddTrickplayInfos.cs | 0 .../Migrations/20230923170422_UserCastReceiver.Designer.cs | 0 .../Migrations/20230923170422_UserCastReceiver.cs | 0 .../Migrations/20240729140605_AddMediaSegments.Designer.cs | 0 .../Migrations/20240729140605_AddMediaSegments.cs | 0 ...0240928082930_MarkSegmentProviderIdNonNullable.Designer.cs | 0 .../20240928082930_MarkSegmentProviderIdNonNullable.cs | 0 .../Migrations/20241020103111_LibraryDbMigration.Designer.cs | 0 .../Migrations/20241020103111_LibraryDbMigration.cs | 0 .../Migrations/20241111131257_AddedCustomDataKey.Designer.cs | 0 .../Migrations/20241111131257_AddedCustomDataKey.cs | 0 .../20241111135439_AddedCustomDataKeyKey.Designer.cs | 0 .../Migrations/20241111135439_AddedCustomDataKeyKey.cs | 0 .../Migrations/20241112152323_FixAncestorIdConfig.Designer.cs | 0 .../Migrations/20241112152323_FixAncestorIdConfig.cs | 0 .../Migrations/20241112232041_fixMediaStreams.Designer.cs | 0 .../Migrations/20241112232041_fixMediaStreams.cs | 0 .../Migrations/20241112234144_FixMediaStreams2.Designer.cs | 0 .../Migrations/20241112234144_FixMediaStreams2.cs | 0 .../20241113133548_EnforceUniqueItemValue.Designer.cs | 0 .../Migrations/20241113133548_EnforceUniqueItemValue.cs | 0 .../Migrations/20250202021306_FixedCollation.Designer.cs | 0 .../Migrations/20250202021306_FixedCollation.cs | 0 .../20250204092455_MakeStartEndDateNullable.Designer.cs | 0 .../Migrations/20250204092455_MakeStartEndDateNullable.cs | 0 .../Migrations/20250214031148_ChannelIdGuid.Designer.cs | 0 .../Migrations/20250214031148_ChannelIdGuid.cs | 0 .../Migrations/JellyfinDbModelSnapshot.cs | 0 .../Migrations/SqliteDesignTimeJellyfinDbFactory.cs | 0 .../ModelBuilderExtensions.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../SqliteDatabaseProvider.cs | 0 .../ValueConverters/DateTimeKindValueConverter.cs | 0 .../Jellyfin.Server.Implementations.Tests.csproj | 1 - 65 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/DoNotUseReturningClauseConvention.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj => Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj} (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/.gitattributes (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200514181226_AddActivityLog.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200514181226_AddActivityLog.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200613202153_AddUsers.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200613202153_AddUsers.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200728005145_AddDisplayPreferences.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200728005145_AddDisplayPreferences.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20200905220533_FixDisplayPreferencesIndex.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20201004171403_AddMaxActiveSessions.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20201204223655_AddCustomDisplayPreferences.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20210320181425_AddIndexesAndCollations.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20210407110544_NullableCustomPrefValue.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20210814002109_AddDevices.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20210814002109_AddDevices.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20230526173516_RemoveEasyPassword.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20230526173516_RemoveEasyPassword.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20230626233818_AddTrickplayInfos.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20230626233818_AddTrickplayInfos.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20230923170422_UserCastReceiver.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20230923170422_UserCastReceiver.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20240729140605_AddMediaSegments.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20240729140605_AddMediaSegments.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241020103111_LibraryDbMigration.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241020103111_LibraryDbMigration.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241111131257_AddedCustomDataKey.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241111131257_AddedCustomDataKey.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241111135439_AddedCustomDataKeyKey.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241112152323_FixAncestorIdConfig.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241112232041_fixMediaStreams.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241112232041_fixMediaStreams.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241112234144_FixMediaStreams2.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241112234144_FixMediaStreams2.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20241113133548_EnforceUniqueItemValue.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20250202021306_FixedCollation.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20250202021306_FixedCollation.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20250204092455_MakeStartEndDateNullable.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20250214031148_ChannelIdGuid.Designer.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/20250214031148_ChannelIdGuid.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/JellyfinDbModelSnapshot.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Migrations/SqliteDesignTimeJellyfinDbFactory.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/ModelBuilderExtensions.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/Properties/AssemblyInfo.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/SqliteDatabaseProvider.cs (100%) rename src/Jellyfin.Database/{Jellyfin.Database.Providers.SqLite => Jellyfin.Database.Providers.Sqlite}/ValueConverters/DateTimeKindValueConverter.cs (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..6733d59aca --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.preferVisualStudioCodeFileSystemWatcher": true +} diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 9bf67118d0..6955cf269f 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -24,7 +24,7 @@ public static class ServiceCollectionExtensions private static IDictionary GetSupportedDbProviders() { - var items = new Dictionary(); + var items = new Dictionary(StringComparer.InvariantCultureIgnoreCase); foreach (var providerType in DatabaseProviderTypes()) { var keyAttribute = providerType.GetCustomAttribute(); @@ -34,7 +34,7 @@ public static class ServiceCollectionExtensions } var provider = providerType; - items[keyAttribute.DatabaseProviderKey.ToUpperInvariant()] = (services) => (IJellyfinDatabaseProvider)ActivatorUtilities.CreateInstance(services, providerType); + items[keyAttribute.DatabaseProviderKey] = (services) => (IJellyfinDatabaseProvider)ActivatorUtilities.CreateInstance(services, providerType); } return items; diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index e73f87d39e..b0ddfbc28c 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -36,7 +36,6 @@ - diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index bb93ef1385..d0f2bafb4e 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -198,7 +198,7 @@ namespace Jellyfin.Server _logger.LogInformation("Running query planner optimizations in the database... This might take a while"); var databaseProvider = appHost.ServiceProvider.GetRequiredService(); - var shutdownSource = new CancellationTokenSource(); + using var shutdownSource = new CancellationTokenSource(); shutdownSource.CancelAfter((int)TimeSpan.FromSeconds(60).TotalMicroseconds); await databaseProvider.RunShutdownTask(shutdownSource.Token).ConfigureAwait(false); } diff --git a/Jellyfin.sln b/Jellyfin.sln index 78f7cce09e..5d672e7ab8 100644 --- a/Jellyfin.sln +++ b/Jellyfin.sln @@ -87,7 +87,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv.Tests", "te EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv", "src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj", "{8C6B2B13-58A4-4506-9DAB-1F882A093FE0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "src\Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Providers.SqLite", "src\Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" EndProject diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/DoNotUseReturningClauseConvention.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/DoNotUseReturningClauseConvention.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/DoNotUseReturningClauseConvention.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/DoNotUseReturningClauseConvention.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Jellyfin.Database.Providers.SqLite.csproj rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/.gitattributes similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/.gitattributes rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/.gitattributes diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200514181226_AddActivityLog.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200613202153_AddUsers.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200728005145_AddDisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201004171403_AddMaxActiveSessions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20201204223655_AddCustomDisplayPreferences.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210320181425_AddIndexesAndCollations.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210407110544_NullableCustomPrefValue.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20210814002109_AddDevices.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230526173516_RemoveEasyPassword.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230626233818_AddTrickplayInfos.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20230923170422_UserCastReceiver.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240729140605_AddMediaSegments.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241020103111_LibraryDbMigration.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111131257_AddedCustomDataKey.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241111135439_AddedCustomDataKeyKey.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112152323_FixAncestorIdConfig.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112232041_fixMediaStreams.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241112234144_FixMediaStreams2.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20241113133548_EnforceUniqueItemValue.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250202021306_FixedCollation.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250204092455_MakeStartEndDateNullable.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.Designer.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.Designer.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.Designer.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/20250214031148_ChannelIdGuid.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/JellyfinDbModelSnapshot.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ModelBuilderExtensions.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Properties/AssemblyInfo.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/Properties/AssemblyInfo.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Properties/AssemblyInfo.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/SqliteDatabaseProvider.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ValueConverters/DateTimeKindValueConverter.cs similarity index 100% rename from src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite/ValueConverters/DateTimeKindValueConverter.cs rename to src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ValueConverters/DateTimeKindValueConverter.cs diff --git a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj index b54e2baf6a..4e2604e6e1 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj +++ b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj @@ -30,7 +30,6 @@ - From 8e9b57aea95a129dd730543e9b06e7c4ccdbf7f3 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 24 Mar 2025 10:14:16 +0000 Subject: [PATCH 28/34] Fixed naming scheme --- .../Extensions/ServiceCollectionExtensions.cs | 2 +- .../Jellyfin.Server.Implementations.csproj | 1 + Jellyfin.sln | 2 +- .../DoNotUseReturningClauseConvention.cs | 2 +- .../Migrations/SqliteDesignTimeJellyfinDbFactory.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../SqliteDatabaseProvider.cs | 2 +- src/Jellyfin.Database/readme.md | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index 6955cf269f..b0e4567a78 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Reflection; -using Jellyfin.Database.Providers.SqLite; +using Jellyfin.Database.Providers.Sqlite; using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Configuration; diff --git a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj index b0ddfbc28c..6693ab8dbd 100644 --- a/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj +++ b/Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj @@ -36,6 +36,7 @@ + diff --git a/Jellyfin.sln b/Jellyfin.sln index 5d672e7ab8..cdc8c8f651 100644 --- a/Jellyfin.sln +++ b/Jellyfin.sln @@ -89,7 +89,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.LiveTv", "src\Jell EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jellyfin.Database", "Jellyfin.Database", "{4C54CE05-69C8-48FA-8785-39F7F6DB1CAD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Providers.SqLite", "src\Jellyfin.Database\Jellyfin.Database.Providers.SqLite\Jellyfin.Database.Providers.SqLite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Providers.Sqlite", "src\Jellyfin.Database\Jellyfin.Database.Providers.Sqlite\Jellyfin.Database.Providers.Sqlite.csproj", "{A5590358-33CC-4B39-BDE7-DC62FEB03C76}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Database.Implementations", "src\Jellyfin.Database\Jellyfin.Database.Implementations\Jellyfin.Database.Implementations.csproj", "{8C9F9221-8415-496C-B1F5-E7756F03FA59}" EndProject diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/DoNotUseReturningClauseConvention.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/DoNotUseReturningClauseConvention.cs index 1ce2420e43..18f336dda8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/DoNotUseReturningClauseConvention.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/DoNotUseReturningClauseConvention.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore.Metadata.Conventions; -namespace Jellyfin.Database.Providers.SqLite; +namespace Jellyfin.Database.Providers.Sqlite; internal class DoNotUseReturningClauseConvention : IModelFinalizingConvention { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs index 11eeb8e02d..448bd2fc8b 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs @@ -1,4 +1,4 @@ -using Jellyfin.Database.Providers.SqLite; +using Jellyfin.Database.Providers.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Logging.Abstractions; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Properties/AssemblyInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Properties/AssemblyInfo.cs index 8d6920f2e8..6c5c7107ea 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Properties/AssemblyInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Jellyfin.Database.Providers.SqLite")] +[assembly: AssemblyTitle("Jellyfin.Database.Providers.Sqlite")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Jellyfin Project")] diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs index 2364186b12..2aa3522d8a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs @@ -8,7 +8,7 @@ using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -namespace Jellyfin.Database.Providers.SqLite; +namespace Jellyfin.Database.Providers.Sqlite; /// /// Configures jellyfin to use an SQLite database. diff --git a/src/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md index d50636b779..344ba2f4d1 100644 --- a/src/Jellyfin.Database/readme.md +++ b/src/Jellyfin.Database/readme.md @@ -17,7 +17,7 @@ with sqlite currently being the only supported provider, you need to run the Ent The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin` ```cmd -dotnet ef migrations add {MIGRATION_NAME} --project "src/Jellyfin.Database/Jellyfin.Database.Providers.SqLite" -- --migration-provider Jellyfin-SQLite +dotnet ef migrations add {MIGRATION_NAME} --project "src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite" -- --migration-provider Jellyfin-SQLite ``` If you get the error: `Run "dotnet tool restore" to make the "dotnet-ef" command available.` Run `dotnet restore`. From 8d49a396e8f68b3940d82b0018f882a37df245d9 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 24 Mar 2025 10:15:28 +0000 Subject: [PATCH 29/34] Fixed readme --- src/Jellyfin.Database/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md index 344ba2f4d1..c2d2282b2f 100644 --- a/src/Jellyfin.Database/readme.md +++ b/src/Jellyfin.Database/readme.md @@ -2,7 +2,7 @@ This shall provide context on how to work with entity frameworks multi provider migration feature. -Jellyfin will support multiple database providers in the future, namely SqLite as its default and the experimental postgresSQL. +Jellyfin will support multiple database providers in the future, namely SQLite as its default and the experimental postgresSQL. Each provider has its own set of migrations, as they contain provider specific instructions to migrate the specific changes to their respective systems. @@ -12,7 +12,7 @@ When creating a new migration, you always have to create migrations for all prov dotnet ef migrations add MIGRATION_NAME --project "PATH_TO_PROJECT" -- --provider PROVIDER_KEY ``` -with sqlite currently being the only supported provider, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell jellyfin to load that provider. +with SQLite currently being the only supported provider, you need to run the Entity Framework tool with the correct project to tell EFCore where to store the migrations and the correct provider key to tell Jellyfin to load that provider. The example is made from the root folder of the project e.g for codespaces `/workspaces/jellyfin` From ef7f6fc8a97118df7f410a7afa2f501f3f4ca3e2 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 24 Mar 2025 10:16:25 +0000 Subject: [PATCH 30/34] fixed typo --- src/Jellyfin.Database/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jellyfin.Database/readme.md b/src/Jellyfin.Database/readme.md index c2d2282b2f..d320b4d5e8 100644 --- a/src/Jellyfin.Database/readme.md +++ b/src/Jellyfin.Database/readme.md @@ -2,7 +2,7 @@ This shall provide context on how to work with entity frameworks multi provider migration feature. -Jellyfin will support multiple database providers in the future, namely SQLite as its default and the experimental postgresSQL. +Jellyfin will support multiple database providers in the future, namely SQLite as its default and the experimental PostgreSQL. Each provider has its own set of migrations, as they contain provider specific instructions to migrate the specific changes to their respective systems. From 160020c551f71441fec093f5a6b2ca2650d9a74d Mon Sep 17 00:00:00 2001 From: JPVenson Date: Tue, 25 Mar 2025 15:30:22 +0000 Subject: [PATCH 31/34] WIP fixed namespaces --- .../ApplicationHost.cs | 2 +- .../Data/CleanDatabaseScheduledTask.cs | 2 +- .../HttpServer/Security/AuthService.cs | 2 +- .../Images/BaseFolderImageProvider.cs | 1 + .../Images/CollectionFolderImageProvider.cs | 1 + .../Images/GenreImageProvider.cs | 1 + .../Images/MusicGenreImageProvider.cs | 1 + .../Library/LibraryManager.cs | 1 + .../Library/MediaSourceManager.cs | 1 + .../Library/MediaStreamSelector.cs | 2 +- .../Library/MusicManager.cs | 1 + .../Library/SearchEngine.cs | 1 + .../Library/SplashscreenPostScanTask.cs | 1 + .../Library/UserDataManager.cs | 2 +- .../Library/UserViewManager.cs | 1 + .../Validators/CollectionPostScanTask.cs | 1 + .../Tasks/OptimizeDatabaseTask.cs | 2 +- .../Session/SessionManager.cs | 1 + .../TV/TVSeriesManager.cs | 1 + .../Auth/CustomAuthenticationHandler.cs | 2 +- .../DefaultAuthorizationHandler.cs | 2 +- .../SyncPlayAccessHandler.cs | 1 + .../UserPermissionRequirement.cs | 2 +- Jellyfin.Api/Controllers/ArtistsController.cs | 1 + .../Controllers/ChannelsController.cs | 1 + .../DisplayPreferencesController.cs | 2 +- Jellyfin.Api/Controllers/GenresController.cs | 1 + Jellyfin.Api/Controllers/ItemsController.cs | 1 + Jellyfin.Api/Controllers/LibraryController.cs | 1 + Jellyfin.Api/Controllers/LiveTvController.cs | 1 + .../Controllers/MediaSegmentsController.cs | 2 +- Jellyfin.Api/Controllers/MoviesController.cs | 1 + .../Controllers/MusicGenresController.cs | 1 + .../Controllers/SuggestionsController.cs | 1 + .../Controllers/TrailersController.cs | 1 + Jellyfin.Api/Controllers/TvShowsController.cs | 1 + Jellyfin.Api/Controllers/UserController.cs | 2 +- Jellyfin.Api/Controllers/YearsController.cs | 1 + Jellyfin.Api/Helpers/MediaInfoHelper.cs | 1 + Jellyfin.Api/Helpers/RequestHelpers.cs | 1 + .../Models/LiveTvDtos/GetProgramsDto.cs | 1 + .../ActivityLogWebSocketListener.cs | 2 +- .../SessionInfoWebSocketListener.cs | 2 +- Jellyfin.Data/DayOfWeekHelper.cs | 2 +- Jellyfin.Data/UserEntityExtensions.cs | 4 +- .../Activity/ActivityManager.cs | 1 + .../DatabaseConfigurationStore.cs | 1 + .../Devices/DeviceManager.cs | 3 +- .../Extensions/ServiceCollectionExtensions.cs | 5 +- .../Item/BaseItemRepository.cs | 2 + .../Item/ChapterRepository.cs | 1 + .../Item/MediaAttachmentRepository.cs | 1 + .../Item/MediaStreamRepository.cs | 1 + .../Item/PeopleRepository.cs | 1 + .../MediaSegments/MediaSegmentManager.cs | 3 +- .../Security/AuthenticationManager.cs | 1 + .../Security/AuthorizationContext.cs | 1 + .../Trickplay/TrickplayManager.cs | 1 + .../Users/DeviceAccessHost.cs | 2 +- .../Users/DisplayPreferencesManager.cs | 1 + .../Users/UserManager.cs | 2 + Jellyfin.Server/CoreAppHost.cs | 2 +- .../ApiServiceCollectionExtensions.cs | 1 + .../Routines/MigrateActivityLogDb.cs | 2 +- .../Routines/MigrateAuthenticationDb.cs | 2 +- .../Routines/MigrateDisplayPreferencesDb.cs | 4 +- .../Migrations/Routines/MigrateLibraryDb.cs | 2 +- .../Migrations/Routines/MigrateUserDb.cs | 4 +- Jellyfin.Server/Program.cs | 2 +- Jellyfin.Server/Startup.cs | 2 +- MediaBrowser.Controller/Channels/Channel.cs | 2 +- .../Entities/Audio/MusicAlbum.cs | 1 + .../Entities/Audio/MusicArtist.cs | 1 + MediaBrowser.Controller/Entities/BaseItem.cs | 1 + MediaBrowser.Controller/Entities/Folder.cs | 1 + .../Entities/InternalItemsQuery.cs | 1 + .../Entities/Movies/BoxSet.cs | 1 + MediaBrowser.Controller/Entities/TV/Series.cs | 1 + .../Entities/UserViewBuilder.cs | 1 + .../Library/ILibraryManager.cs | 1 + .../MediaEncoding/EncodingHelper.cs | 1 + .../MediaSegments/IMediaSegmentManager.cs | 2 +- MediaBrowser.Controller/Playlists/Playlist.cs | 1 + .../Transcoding/TranscodeManager.cs | 2 +- .../Configuration/UserConfiguration.cs | 2 +- .../Dto/DisplayPreferencesDto.cs | 2 +- .../LiveTv/LiveTvChannelQuery.cs | 1 + MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs | 2 +- .../MediaSegments/MediaSegmentDto.cs | 2 +- MediaBrowser.Model/Users/UserPolicy.cs | 1 + .../DatabaseConfigurationOptions.cs | 4 +- .../Entities/AccessSchedule.cs | 2 +- .../Entities/ActivityLog.cs | 2 +- .../Entities/BaseItemEntity.cs | 2 - .../Entities/BaseItemImageInfo.cs | 1 - .../Entities/BaseItemProvider.cs | 3 - .../Entities/DisplayPreferences.cs | 2 +- .../Entities/Group.cs | 4 +- .../Entities/HomeSection.cs | 2 +- .../Entities/ItemDisplayPreferences.cs | 2 +- .../Entities/ItemValueMap.cs | 1 - .../Entities/Libraries/Artwork.cs | 4 +- .../Entities/Libraries/Book.cs | 2 +- .../Entities/Libraries/BookMetadata.cs | 2 +- .../Entities/Libraries/Chapter.cs | 2 +- .../Entities/Libraries/Collection.cs | 2 +- .../Entities/Libraries/CollectionItem.cs | 2 +- .../Entities/Libraries/Company.cs | 2 +- .../Entities/Libraries/CustomItem.cs | 2 +- .../Entities/Libraries/Episode.cs | 2 +- .../Entities/Libraries/Genre.cs | 2 +- .../Entities/Libraries/ItemMetadata.cs | 2 +- .../Entities/Libraries/Library.cs | 2 +- .../Entities/Libraries/LibraryItem.cs | 2 +- .../Entities/Libraries/MediaFile.cs | 4 +- .../Entities/Libraries/MediaFileStream.cs | 2 +- .../Entities/Libraries/MetadataProvider.cs | 2 +- .../Entities/Libraries/MetadataProviderId.cs | 2 +- .../Entities/Libraries/Movie.cs | 2 +- .../Entities/Libraries/MovieMetadata.cs | 2 +- .../Entities/Libraries/Person.cs | 2 +- .../Entities/Libraries/PersonRole.cs | 4 +- .../Entities/Libraries/Photo.cs | 2 +- .../Entities/Libraries/Rating.cs | 2 +- .../Entities/Libraries/RatingSource.cs | 2 +- .../Entities/Libraries/Release.cs | 2 +- .../Entities/Libraries/SeriesMetadata.cs | 2 +- .../Entities/Libraries/Track.cs | 2 +- .../Entities/MediaSegment.cs | 2 +- .../Entities/MediaStreamInfo.cs | 1 - .../Entities/Permission.cs | 4 +- .../Entities/Preference.cs | 4 +- .../Entities/User.cs | 6 +- .../Entities/UserData.cs | 1 - .../Enums/ArtKind.cs | 49 +++-- .../Enums/ChromecastVersion.cs | 25 ++- .../Enums/DynamicDayOfWeek.cs | 89 ++++---- .../Enums/HomeSectionType.cs | 89 ++++---- .../Enums/IndexingKind.cs | 33 ++- .../Enums/MediaFileKind.cs | 49 +++-- .../Enums/MediaSegmentType.cs | 2 +- .../Enums/PermissionKind.cs | 201 +++++++++--------- .../Enums/PersonRoleType.cs | 105 +++++---- .../Enums/PreferenceKind.cs | 113 +++++----- .../Enums/ScrollDirection.cs | 25 ++- .../Enums/SortOrder.cs | 25 ++- .../Enums/SubtitlePlaybackMode.cs | 49 +++-- .../Enums/SyncPlayUserAccessType.cs | 33 ++- .../Enums/ViewType.cs | 177 ++++++++------- .../IJellyfinDatabaseProvider.cs | 3 +- .../Interfaces/IHasArtwork.cs | 2 +- .../Interfaces/IHasCompanies.cs | 2 +- .../Interfaces/IHasConcurrencyToken.cs | 25 ++- .../Interfaces/IHasPermissions.cs | 18 +- .../Interfaces/IHasReleases.cs | 17 +- .../JellyfinDatabaseProviderKeyAttribute.cs | 4 +- .../JellyfinDbContext.cs | 6 +- .../ActivityLogConfiguration.cs | 2 +- .../AncestorIdConfiguration.cs | 3 +- .../ModelConfiguration/ApiKeyConfiguration.cs | 2 +- .../AttachmentStreamInfoConfiguration.cs | 2 +- .../BaseItemConfiguration.cs | 2 +- .../BaseItemMetadataFieldConfiguration.cs | 2 +- .../BaseItemProviderConfiguration.cs | 3 +- .../BaseItemTrailerTypeConfiguration.cs | 2 +- .../ChapterConfiguration.cs | 3 +- ...stomItemDisplayPreferencesConfiguration.cs | 2 +- .../ModelConfiguration/DeviceConfiguration.cs | 2 +- .../DeviceOptionsConfiguration.cs | 2 +- .../DisplayPreferencesConfiguration.cs | 2 +- .../ItemValuesConfiguration.cs | 3 +- .../ItemValuesMapConfiguration.cs | 3 +- .../MediaStreamInfoConfiguration.cs | 3 +- .../PeopleBaseItemMapConfiguration.cs | 3 +- .../ModelConfiguration/PeopleConfiguration.cs | 3 +- .../PermissionConfiguration.cs | 2 +- .../PreferenceConfiguration.cs | 2 +- .../TrickplayInfoConfiguration.cs | 2 +- .../ModelConfiguration/UserConfiguration.cs | 2 +- .../UserDataConfiguration.cs | 3 +- .../20200514181226_AddActivityLog.Designer.cs | 2 +- .../20200613202153_AddUsers.Designer.cs | 2 +- ...28005145_AddDisplayPreferences.Designer.cs | 2 +- ...533_FixDisplayPreferencesIndex.Designer.cs | 2 +- ...004171403_AddMaxActiveSessions.Designer.cs | 2 +- ...55_AddCustomDisplayPreferences.Designer.cs | 2 +- ...181425_AddIndexesAndCollations.Designer.cs | 2 +- ...110544_NullableCustomPrefValue.Designer.cs | 2 +- .../20210814002109_AddDevices.Designer.cs | 2 +- ...ddIndexActivityLogsDateCreated.Designer.cs | 2 +- ...30526173516_RemoveEasyPassword.Designer.cs | 2 +- ...230626233818_AddTrickplayInfos.Designer.cs | 2 +- ...0230923170422_UserCastReceiver.Designer.cs | 2 +- ...0240729140605_AddMediaSegments.Designer.cs | 2 +- ...rkSegmentProviderIdNonNullable.Designer.cs | 2 +- ...41020103111_LibraryDbMigration.Designer.cs | 2 +- ...41111131257_AddedCustomDataKey.Designer.cs | 2 +- ...11135439_AddedCustomDataKeyKey.Designer.cs | 2 +- ...1112152323_FixAncestorIdConfig.Designer.cs | 2 +- ...20241112232041_fixMediaStreams.Designer.cs | 2 +- ...0241112234144_FixMediaStreams2.Designer.cs | 2 +- ...3133548_EnforceUniqueItemValue.Designer.cs | 2 +- .../20250202021306_FixedCollation.Designer.cs | 2 +- ...92455_MakeStartEndDateNullable.Designer.cs | 2 +- .../20250214031148_ChannelIdGuid.Designer.cs | 2 +- .../Migrations/JellyfinDbModelSnapshot.cs | 2 +- .../SqliteDesignTimeJellyfinDbFactory.cs | 1 + .../ModelBuilderExtensions.cs | 59 +++-- .../SqliteDatabaseProvider.cs | 2 +- .../Channels/ChannelManager.cs | 1 + src/Jellyfin.LiveTv/DefaultLiveTvService.cs | 1 + src/Jellyfin.LiveTv/LiveTvManager.cs | 1 + .../Recordings/RecordingNotifier.cs | 2 +- .../Recordings/RecordingsManager.cs | 1 + .../Auth/CustomAuthenticationHandlerTests.cs | 2 +- .../FirstTimeSetupHandlerTests.cs | 2 +- .../IgnoreScheduleHandlerTests.cs | 2 +- .../Helpers/RequestHelpersTests.cs | 1 + tests/Jellyfin.Api.Tests/TestHelpers.cs | 2 +- 219 files changed, 793 insertions(+), 773 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 6e8a9fc204..4d959905d9 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -35,11 +35,11 @@ using Emby.Server.Implementations.SyncPlay; using Emby.Server.Implementations.TV; using Emby.Server.Implementations.Updates; using Jellyfin.Api.Helpers; +using Jellyfin.Database.Implementations; using Jellyfin.Drawing; using Jellyfin.MediaEncoding.Hls.Playlist; using Jellyfin.Networking.Manager; using Jellyfin.Networking.Udp; -using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.Item; using Jellyfin.Server.Implementations.MediaSegments; using MediaBrowser.Common; diff --git a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs index a83ded439c..63481b1f8c 100644 --- a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs +++ b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs @@ -4,7 +4,7 @@ using System; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs index 82945a4f62..8a79cdebc1 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Net; using Microsoft.AspNetCore.Http; diff --git a/Emby.Server.Implementations/Images/BaseFolderImageProvider.cs b/Emby.Server.Implementations/Images/BaseFolderImageProvider.cs index f9c10ba098..0d63b3af7d 100644 --- a/Emby.Server.Implementations/Images/BaseFolderImageProvider.cs +++ b/Emby.Server.Implementations/Images/BaseFolderImageProvider.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs b/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs index 34c722e41d..273d356a39 100644 --- a/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs +++ b/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.IO; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Images/GenreImageProvider.cs b/Emby.Server.Implementations/Images/GenreImageProvider.cs index c9b41f8193..706de60a90 100644 --- a/Emby.Server.Implementations/Images/GenreImageProvider.cs +++ b/Emby.Server.Implementations/Images/GenreImageProvider.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Images/MusicGenreImageProvider.cs b/Emby.Server.Implementations/Images/MusicGenreImageProvider.cs index 31f053f065..c472623e67 100644 --- a/Emby.Server.Implementations/Images/MusicGenreImageProvider.cs +++ b/Emby.Server.Implementations/Images/MusicGenreImageProvider.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index b0003ed414..846663900b 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -21,6 +21,7 @@ using Emby.Server.Implementations.Sorting; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index 3e71b2fcde..8631958365 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -16,6 +16,7 @@ using AsyncKeyedLock; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; using MediaBrowser.Common.Configuration; diff --git a/Emby.Server.Implementations/Library/MediaStreamSelector.cs b/Emby.Server.Implementations/Library/MediaStreamSelector.cs index 6791e3ca90..631179ffcf 100644 --- a/Emby.Server.Implementations/Library/MediaStreamSelector.cs +++ b/Emby.Server.Implementations/Library/MediaStreamSelector.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Model.Entities; diff --git a/Emby.Server.Implementations/Library/MusicManager.cs b/Emby.Server.Implementations/Library/MusicManager.cs index 71c69ec50a..ffbf8068f0 100644 --- a/Emby.Server.Implementations/Library/MusicManager.cs +++ b/Emby.Server.Implementations/Library/MusicManager.cs @@ -6,6 +6,7 @@ using System.Collections.Immutable; using System.Linq; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/SearchEngine.cs b/Emby.Server.Implementations/Library/SearchEngine.cs index 3ac1d02192..9253a9a69f 100644 --- a/Emby.Server.Implementations/Library/SearchEngine.cs +++ b/Emby.Server.Implementations/Library/SearchEngine.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs b/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs index 76e564d535..0c9edd8398 100644 --- a/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs +++ b/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index a41ef888b0..2a28131519 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -7,8 +7,8 @@ using System.Globalization; using System.Linq; using System.Threading; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using Jellyfin.Extensions; -using Jellyfin.Server.Implementations; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 2560466c10..22baafbb07 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -9,6 +9,7 @@ using System.Threading; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Configuration; diff --git a/Emby.Server.Implementations/Library/Validators/CollectionPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/CollectionPostScanTask.cs index 89f64ee4f0..337b1afdd4 100644 --- a/Emby.Server.Implementations/Library/Validators/CollectionPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/CollectionPostScanTask.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Collections; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Movies; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs index 05223d28ae..4d3a04377f 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/OptimizeDatabaseTask.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Tasks; using Microsoft.EntityFrameworkCore; diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index dc37c4f2a2..959373fec8 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -13,6 +13,7 @@ using Jellyfin.Data.Entities.Security; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Events; using MediaBrowser.Common.Extensions; diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index 270c1b4411..74db077d8c 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -6,6 +6,7 @@ using System.Linq; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs index 0fd0149904..f6f2f59c52 100644 --- a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs +++ b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs @@ -4,7 +4,7 @@ using System.Text.Encodings.Web; using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Data; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; using Microsoft.AspNetCore.Authentication; diff --git a/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs b/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs index 07dedb017a..6b80d537fb 100644 --- a/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs +++ b/Jellyfin.Api/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandler.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Data; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; diff --git a/Jellyfin.Api/Auth/SyncPlayAccessPolicy/SyncPlayAccessHandler.cs b/Jellyfin.Api/Auth/SyncPlayAccessPolicy/SyncPlayAccessHandler.cs index 5fcf72fb46..7efb5b1698 100644 --- a/Jellyfin.Api/Auth/SyncPlayAccessPolicy/SyncPlayAccessHandler.cs +++ b/Jellyfin.Api/Auth/SyncPlayAccessPolicy/SyncPlayAccessHandler.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Extensions; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.SyncPlay; diff --git a/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionRequirement.cs b/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionRequirement.cs index a7c3cce971..152c400cde 100644 --- a/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionRequirement.cs +++ b/Jellyfin.Api/Auth/UserPermissionPolicy/UserPermissionRequirement.cs @@ -1,5 +1,5 @@ using Jellyfin.Api.Auth.DefaultAuthorizationPolicy; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Api.Auth.UserPermissionPolicy { diff --git a/Jellyfin.Api/Controllers/ArtistsController.cs b/Jellyfin.Api/Controllers/ArtistsController.cs index 10556da65d..2da4839138 100644 --- a/Jellyfin.Api/Controllers/ArtistsController.cs +++ b/Jellyfin.Api/Controllers/ArtistsController.cs @@ -6,6 +6,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/ChannelsController.cs b/Jellyfin.Api/Controllers/ChannelsController.cs index 2f55e88ec4..880b3a82d4 100644 --- a/Jellyfin.Api/Controllers/ChannelsController.cs +++ b/Jellyfin.Api/Controllers/ChannelsController.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs index 6d94d96f3a..2196616dd9 100644 --- a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs +++ b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs @@ -5,7 +5,7 @@ using System.Globalization; using System.Linq; using Jellyfin.Api.Helpers; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; using MediaBrowser.Model.Dto; diff --git a/Jellyfin.Api/Controllers/GenresController.cs b/Jellyfin.Api/Controllers/GenresController.cs index f0d17decbf..1fd57eba9c 100644 --- a/Jellyfin.Api/Controllers/GenresController.cs +++ b/Jellyfin.Api/Controllers/GenresController.cs @@ -6,6 +6,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index e6fe7df79c..803c2f1f78 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -6,6 +6,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs index 7c6160fc49..ff4540f58f 100644 --- a/Jellyfin.Api/Controllers/LibraryController.cs +++ b/Jellyfin.Api/Controllers/LibraryController.cs @@ -13,6 +13,7 @@ using Jellyfin.Api.ModelBinders; using Jellyfin.Api.Models.LibraryDtos; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Api; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs index 1c0a6af79d..5461d12fa2 100644 --- a/Jellyfin.Api/Controllers/LiveTvController.cs +++ b/Jellyfin.Api/Controllers/LiveTvController.cs @@ -15,6 +15,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Api.Models.LiveTvDtos; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Api; using MediaBrowser.Common.Configuration; diff --git a/Jellyfin.Api/Controllers/MediaSegmentsController.cs b/Jellyfin.Api/Controllers/MediaSegmentsController.cs index 2d1d4e2c8a..e30e2b54e4 100644 --- a/Jellyfin.Api/Controllers/MediaSegmentsController.cs +++ b/Jellyfin.Api/Controllers/MediaSegmentsController.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using Jellyfin.Api.Extensions; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.cs index cbbaaddbfe..09a7b73b94 100644 --- a/Jellyfin.Api/Controllers/MoviesController.cs +++ b/Jellyfin.Api/Controllers/MoviesController.cs @@ -7,6 +7,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; diff --git a/Jellyfin.Api/Controllers/MusicGenresController.cs b/Jellyfin.Api/Controllers/MusicGenresController.cs index e8bc8f2657..0cb20e433d 100644 --- a/Jellyfin.Api/Controllers/MusicGenresController.cs +++ b/Jellyfin.Api/Controllers/MusicGenresController.cs @@ -6,6 +6,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/SuggestionsController.cs b/Jellyfin.Api/Controllers/SuggestionsController.cs index 9b56d08494..5075d91be7 100644 --- a/Jellyfin.Api/Controllers/SuggestionsController.cs +++ b/Jellyfin.Api/Controllers/SuggestionsController.cs @@ -5,6 +5,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/TrailersController.cs b/Jellyfin.Api/Controllers/TrailersController.cs index 7ee4396bba..3e4bac89a5 100644 --- a/Jellyfin.Api/Controllers/TrailersController.cs +++ b/Jellyfin.Api/Controllers/TrailersController.cs @@ -1,6 +1,7 @@ using System; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; diff --git a/Jellyfin.Api/Controllers/TvShowsController.cs b/Jellyfin.Api/Controllers/TvShowsController.cs index cc070244b1..0f08854d24 100644 --- a/Jellyfin.Api/Controllers/TvShowsController.cs +++ b/Jellyfin.Api/Controllers/TvShowsController.cs @@ -7,6 +7,7 @@ using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/UserController.cs b/Jellyfin.Api/Controllers/UserController.cs index 838578fab8..d0ced277a0 100644 --- a/Jellyfin.Api/Controllers/UserController.cs +++ b/Jellyfin.Api/Controllers/UserController.cs @@ -8,7 +8,7 @@ using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.Models.UserDtos; using Jellyfin.Data; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Api; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Controllers/YearsController.cs b/Jellyfin.Api/Controllers/YearsController.cs index 2b32ae728c..bbfa270db9 100644 --- a/Jellyfin.Api/Controllers/YearsController.cs +++ b/Jellyfin.Api/Controllers/YearsController.cs @@ -8,6 +8,7 @@ using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Helpers/MediaInfoHelper.cs b/Jellyfin.Api/Helpers/MediaInfoHelper.cs index 2c45789d34..1801b6bfd4 100644 --- a/Jellyfin.Api/Helpers/MediaInfoHelper.cs +++ b/Jellyfin.Api/Helpers/MediaInfoHelper.cs @@ -10,6 +10,7 @@ using Jellyfin.Api.Extensions; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index eb83a37ba4..3c2691cb5e 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -7,6 +7,7 @@ using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs index dece664262..2616694d83 100644 --- a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs +++ b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text.Json.Serialization; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions.Json.Converters; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; diff --git a/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs b/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs index e2e7b0cb5a..60379f4152 100644 --- a/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs +++ b/Jellyfin.Api/WebSocketListeners/ActivityLogWebSocketListener.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Enums; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs b/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs index cc0792477e..9d149cc85a 100644 --- a/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs +++ b/Jellyfin.Api/WebSocketListeners/SessionInfoWebSocketListener.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Net; diff --git a/Jellyfin.Data/DayOfWeekHelper.cs b/Jellyfin.Data/DayOfWeekHelper.cs index 82abfb8313..836860e0ea 100644 --- a/Jellyfin.Data/DayOfWeekHelper.cs +++ b/Jellyfin.Data/DayOfWeekHelper.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Data { diff --git a/Jellyfin.Data/UserEntityExtensions.cs b/Jellyfin.Data/UserEntityExtensions.cs index 8d84a6b6e1..8bf82265c9 100644 --- a/Jellyfin.Data/UserEntityExtensions.cs +++ b/Jellyfin.Data/UserEntityExtensions.cs @@ -2,8 +2,8 @@ using System; using System.ComponentModel; using System.Linq; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data; diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs index 54272aeafa..007a468bf2 100644 --- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs +++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Jellyfin.Data.Entities; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Querying; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs index 180561fc84..537630561c 100644 --- a/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs +++ b/Jellyfin.Server.Implementations/DbConfiguration/DatabaseConfigurationStore.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Jellyfin.Database.Implementations.DbConfiguration; using MediaBrowser.Common.Configuration; namespace Jellyfin.Server.Implementations.DatabaseConfiguration; diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index 1b4048b8e6..e414a8232f 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -7,9 +7,10 @@ using Jellyfin.Data; using Jellyfin.Data.Dtos; using Jellyfin.Data.Entities; using Jellyfin.Data.Entities.Security; -using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Devices; diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs index b0e4567a78..fbbb5bca73 100644 --- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs +++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs @@ -1,14 +1,15 @@ using System; using System.Collections.Generic; using System.Reflection; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.DbConfiguration; using Jellyfin.Database.Providers.Sqlite; -using Jellyfin.Server.Implementations.DatabaseConfiguration; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Configuration; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using JellyfinDbProviderFactory = System.Func; +using JellyfinDbProviderFactory = System.Func; namespace Jellyfin.Server.Implementations.Extensions; diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index bea69b2820..1f04b28290 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -18,6 +18,8 @@ using System.Text.Json; using System.Threading; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; using MediaBrowser.Common; diff --git a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs index fc6f04d56a..48b94a5f3f 100644 --- a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs +++ b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller.Chapters; using MediaBrowser.Controller.Drawing; using MediaBrowser.Model.Dto; diff --git a/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs b/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs index 1557982093..18167cc530 100644 --- a/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs +++ b/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs @@ -4,6 +4,7 @@ using System.Collections.Immutable; using System.Linq; using System.Threading; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Entities; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs index f47e3fdfd3..f700718841 100644 --- a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs +++ b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs @@ -4,6 +4,7 @@ using System.Collections.Immutable; using System.Linq; using System.Threading; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Entities; diff --git a/Jellyfin.Server.Implementations/Item/PeopleRepository.cs b/Jellyfin.Server.Implementations/Item/PeopleRepository.cs index a8dfd4cd3a..01a0ade63c 100644 --- a/Jellyfin.Server.Implementations/Item/PeopleRepository.cs +++ b/Jellyfin.Server.Implementations/Item/PeopleRepository.cs @@ -4,6 +4,7 @@ using System.Collections.Immutable; using System.Linq; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations; using Jellyfin.Extensions; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; diff --git a/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs b/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs index 59ec418ce7..fa507ad040 100644 --- a/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs +++ b/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs @@ -6,7 +6,8 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; diff --git a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs index 1c9f54ab03..534e80f4e7 100644 --- a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs +++ b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Jellyfin.Data.Entities.Security; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller.Security; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs index 9e225393c4..e3fe517c49 100644 --- a/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs +++ b/Jellyfin.Server.Implementations/Security/AuthorizationContext.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Net; using System.Threading.Tasks; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations; using Jellyfin.Extensions; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index 6949ec1a8c..b55d2271a6 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Drawing; diff --git a/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs b/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs index 27222a183c..02a52e5f25 100644 --- a/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs +++ b/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs @@ -2,9 +2,9 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Session; diff --git a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs index e204a16a64..3f9491038d 100644 --- a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs +++ b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index 79fa70c0b2..0105f8162d 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -12,6 +12,8 @@ using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using Jellyfin.Data.Events.Users; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs index 9788119a54..f3bf6b805a 100644 --- a/Jellyfin.Server/CoreAppHost.cs +++ b/Jellyfin.Server/CoreAppHost.cs @@ -4,10 +4,10 @@ using System.Reflection; using Emby.Server.Implementations; using Emby.Server.Implementations.Session; using Jellyfin.Api.WebSocketListeners; +using Jellyfin.Database.Implementations; using Jellyfin.Drawing; using Jellyfin.Drawing.Skia; using Jellyfin.LiveTv; -using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.Activity; using Jellyfin.Server.Implementations.Devices; using Jellyfin.Server.Implementations.Events; diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index 597643ed19..c3b02ad4ed 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -19,6 +19,7 @@ using Jellyfin.Api.Controllers; using Jellyfin.Api.Formatters; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions.Json; using Jellyfin.Server.Configuration; using Jellyfin.Server.Filters; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs index 2f23cb1f8f..933d85de01 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using Emby.Server.Implementations.Data; using Jellyfin.Data.Entities; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller; using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs index c845beef2f..a50990ac5d 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using Emby.Server.Implementations.Data; using Jellyfin.Data.Entities.Security; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using MediaBrowser.Controller; using MediaBrowser.Controller.Library; using Microsoft.Data.Sqlite; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs index 502a37cde1..4f6c5100d9 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs @@ -6,8 +6,8 @@ using System.Text.Json; using System.Text.Json.Serialization; using Emby.Server.Implementations.Data; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Dto; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs index f183bce107..490daae42b 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs @@ -12,8 +12,8 @@ using System.Text; using System.Threading; using Emby.Server.Implementations.Data; using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations; using Jellyfin.Extensions; -using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.Item; using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs index f126230fb4..bd5bf98e0f 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs @@ -3,9 +3,9 @@ using System.IO; using Emby.Server.Implementations.Data; using Jellyfin.Data; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions.Json; -using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.Users; using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index d8684f6da7..32814393cf 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -8,9 +8,9 @@ using System.Threading; using System.Threading.Tasks; using CommandLine; using Emby.Server.Implementations; +using Jellyfin.Database.Implementations; using Jellyfin.Server.Extensions; using Jellyfin.Server.Helpers; -using Jellyfin.Server.Implementations; using Jellyfin.Server.ServerSetupApp; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs index fa21d25664..688b169359 100644 --- a/Jellyfin.Server/Startup.cs +++ b/Jellyfin.Server/Startup.cs @@ -6,6 +6,7 @@ using System.Net.Mime; using System.Text; using Emby.Server.Implementations.EntryPoints; using Jellyfin.Api.Middleware; +using Jellyfin.Database.Implementations; using Jellyfin.LiveTv.Extensions; using Jellyfin.LiveTv.Recordings; using Jellyfin.MediaEncoding.Hls.Extensions; @@ -13,7 +14,6 @@ using Jellyfin.Networking; using Jellyfin.Networking.HappyEyeballs; using Jellyfin.Server.Extensions; using Jellyfin.Server.HealthChecks; -using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations.Extensions; using Jellyfin.Server.Infrastructure; using MediaBrowser.Common.Net; diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs index 49f8df508e..f6cbf5a00c 100644 --- a/MediaBrowser.Controller/Channels/Channel.cs +++ b/MediaBrowser.Controller/Channels/Channel.cs @@ -9,7 +9,7 @@ using System.Text.Json.Serialization; using System.Threading; using Jellyfin.Data; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 3b0938ea79..d6e6592429 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index e99479ee19..39dc909633 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index e20679084d..29481481c4 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -15,6 +15,7 @@ using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Channels; diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index b2f23cc11d..d3e9da6226 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -16,6 +16,7 @@ using J2N.Collections.Generic.Extensions; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Collections; diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index 0bd28154de..57a8a01131 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -6,6 +6,7 @@ using System.Linq; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index 07def2e0f2..a252b7a25f 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -10,6 +10,7 @@ using System.Text.Json.Serialization; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index f3c252decc..470702f3e6 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index 3670808673..18845ab9f6 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -9,6 +9,7 @@ using System.Linq; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.TV; diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index e4490bca3b..13915dc5c6 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 1c5d2f4e53..cf76f336c8 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -15,6 +15,7 @@ using System.Text.RegularExpressions; using System.Threading; using Jellyfin.Data; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Extensions; diff --git a/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs b/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs index 570d2bacea..1e75446e1c 100644 --- a/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs +++ b/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.MediaSegments; diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index 491acdc9c2..53e04066f0 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; diff --git a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs index d35ed57b89..85bb862c77 100644 --- a/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs +++ b/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs @@ -11,7 +11,7 @@ using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; using Jellyfin.Data; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common; using MediaBrowser.Common.Configuration; diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index b477f2593a..fe4b2de65f 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace MediaBrowser.Model.Configuration { diff --git a/MediaBrowser.Model/Dto/DisplayPreferencesDto.cs b/MediaBrowser.Model/Dto/DisplayPreferencesDto.cs index 90163ae91f..54cbe65f68 100644 --- a/MediaBrowser.Model/Dto/DisplayPreferencesDto.cs +++ b/MediaBrowser.Model/Dto/DisplayPreferencesDto.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index d872572b77..38e2731762 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -3,6 +3,7 @@ using System; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs index dae885775c..e93ad81d3a 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs @@ -1,6 +1,6 @@ #pragma warning disable CS1591 -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs b/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs index a0433fee18..6e5c7885cc 100644 --- a/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs +++ b/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs @@ -1,5 +1,5 @@ using System; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace MediaBrowser.Model.MediaSegments; diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index 951e057632..ba0eaf21cf 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Xml.Serialization; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using AccessSchedule = Jellyfin.Data.Entities.AccessSchedule; namespace MediaBrowser.Model.Users diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs index af2ede7010..b481a106fd 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/DbConfiguration/DatabaseConfigurationOptions.cs @@ -1,6 +1,4 @@ -using System; - -namespace Jellyfin.Server.Implementations.DatabaseConfiguration; +namespace Jellyfin.Database.Implementations.DbConfiguration; /// /// Options to configure jellyfins managed database. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs index f534e49f3f..909e8750f8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations.Schema; using System.Xml.Serialization; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs index 51dd0ffb8e..3a76784052 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; using Microsoft.Extensions.Logging; namespace Jellyfin.Data.Entities diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs index e3e0e0861e..42be5b3b99 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs @@ -3,8 +3,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs index 37723df116..ac6b72acea 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs @@ -1,7 +1,6 @@ #pragma warning disable CA2227 using System; -using System.Collections.Generic; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs index 9a1565728d..c0c5e3147f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs index f0be657691..82bf007a8a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs index 09f2372893..4b343c164a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Linq; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs index 8dd6e647e2..edffec4aba 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs @@ -1,5 +1,5 @@ using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs index 93e6664ea4..7e75a200b6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs index 94db6a011b..e80a9aec34 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs index fc3c1036f0..b529da8fa7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs @@ -1,8 +1,8 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs index a838686d05..54c30d92ce 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs index 4a350d200e..7b1a68bb55 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs index f068338f92..cbcb9a5f54 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs index 7de6019692..8da9793f9d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs index 15b356a74e..4bd99d83a7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs index 1abbee4458..5dc1039a1f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs index e27d01d860..92307afecd 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs index ce2f0c6178..6379755264 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs index 3b822ee828..329b8973f5 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs index fa9276c669..401d58ff22 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs index 0db42a1c7b..17673cb1d9 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs index d889b871ed..975614be10 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs index 7b5a3af64c..0913f95be1 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs @@ -2,8 +2,8 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs index e24e73ecb7..3170653fec 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs index b38d6a4f1f..afaebb8e86 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs index a198f53ba3..fa36e58db7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs index 499fafd0e1..beae325ec5 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs index 44b5f34d7f..df48ebf279 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs index 90dc55b70d..d9609f1cc0 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs index 7d40bdf448..627f74140b 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs index 4b459432bc..094d57139c 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs index 58c8fa49ef..6b792ffb48 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs index 0f3a073244..91ee8caa16 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs index e68ab9105a..40466def1d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs index 42115802c5..28da91e472 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs index d354000337..6d6a920225 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities.Libraries { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs index 90120d7721..8c1c071e63 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs @@ -1,6 +1,6 @@ using System; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs index 77816565af..b16b62b104 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs @@ -1,7 +1,6 @@ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member using System; -using System.Diagnostics.CodeAnalysis; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs index 6d2e68077c..c488b90e1c 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs @@ -3,8 +3,8 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs index a6ab275d31..f4f9dd17ac 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs @@ -1,8 +1,8 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs index f3398eeeac..aafa92b4a6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; using System.Text.Json.Serialization; -using Jellyfin.Data.Enums; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Enums; +using Jellyfin.Database.Implementations.Interfaces; namespace Jellyfin.Data.Entities { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs index 05ab6dd2d2..ced12b9e62 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs index f7a73848c8..218e97bcc0 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ArtKind.cs @@ -1,33 +1,32 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing types of art. +/// +public enum ArtKind { /// - /// An enum representing types of art. + /// Another type of art, not covered by the other members. /// - public enum ArtKind - { - /// - /// Another type of art, not covered by the other members. - /// - Other = 0, + Other = 0, - /// - /// A poster. - /// - Poster = 1, + /// + /// A poster. + /// + Poster = 1, - /// - /// A banner. - /// - Banner = 2, + /// + /// A banner. + /// + Banner = 2, - /// - /// A thumbnail. - /// - Thumbnail = 3, + /// + /// A thumbnail. + /// + Thumbnail = 3, - /// - /// A logo. - /// - Logo = 4 - } + /// + /// A logo. + /// + Logo = 4 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs index c9c8a4a625..123f2fe438 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ChromecastVersion.cs @@ -1,18 +1,17 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing the version of Chromecast to be used by clients. +/// +public enum ChromecastVersion { /// - /// An enum representing the version of Chromecast to be used by clients. + /// Stable Chromecast version. /// - public enum ChromecastVersion - { - /// - /// Stable Chromecast version. - /// - Stable = 0, + Stable = 0, - /// - /// Unstable Chromecast version. - /// - Unstable = 1 - } + /// + /// Unstable Chromecast version. + /// + Unstable = 1 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs index d3d8dd8227..69a9b5816a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/DynamicDayOfWeek.cs @@ -1,58 +1,57 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum that represents a day of the week, weekdays, weekends, or all days. +/// +public enum DynamicDayOfWeek { /// - /// An enum that represents a day of the week, weekdays, weekends, or all days. + /// Sunday. /// - public enum DynamicDayOfWeek - { - /// - /// Sunday. - /// - Sunday = 0, + Sunday = 0, - /// - /// Monday. - /// - Monday = 1, + /// + /// Monday. + /// + Monday = 1, - /// - /// Tuesday. - /// - Tuesday = 2, + /// + /// Tuesday. + /// + Tuesday = 2, - /// - /// Wednesday. - /// - Wednesday = 3, + /// + /// Wednesday. + /// + Wednesday = 3, - /// - /// Thursday. - /// - Thursday = 4, + /// + /// Thursday. + /// + Thursday = 4, - /// - /// Friday. - /// - Friday = 5, + /// + /// Friday. + /// + Friday = 5, - /// - /// Saturday. - /// - Saturday = 6, + /// + /// Saturday. + /// + Saturday = 6, - /// - /// All days of the week. - /// - Everyday = 7, + /// + /// All days of the week. + /// + Everyday = 7, - /// - /// A week day, or Monday-Friday. - /// - Weekday = 8, + /// + /// A week day, or Monday-Friday. + /// + Weekday = 8, - /// - /// Saturday and Sunday. - /// - Weekend = 9 - } + /// + /// Saturday and Sunday. + /// + Weekend = 9 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs index 62da8c3fff..6ba57e74d5 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/HomeSectionType.cs @@ -1,58 +1,57 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing the different options for the home screen sections. +/// +public enum HomeSectionType { /// - /// An enum representing the different options for the home screen sections. + /// None. /// - public enum HomeSectionType - { - /// - /// None. - /// - None = 0, + None = 0, - /// - /// My Media. - /// - SmallLibraryTiles = 1, + /// + /// My Media. + /// + SmallLibraryTiles = 1, - /// - /// My Media Small. - /// - LibraryButtons = 2, + /// + /// My Media Small. + /// + LibraryButtons = 2, - /// - /// Active Recordings. - /// - ActiveRecordings = 3, + /// + /// Active Recordings. + /// + ActiveRecordings = 3, - /// - /// Continue Watching. - /// - Resume = 4, + /// + /// Continue Watching. + /// + Resume = 4, - /// - /// Continue Listening. - /// - ResumeAudio = 5, + /// + /// Continue Listening. + /// + ResumeAudio = 5, - /// - /// Latest Media. - /// - LatestMedia = 6, + /// + /// Latest Media. + /// + LatestMedia = 6, - /// - /// Next Up. - /// - NextUp = 7, + /// + /// Next Up. + /// + NextUp = 7, - /// - /// Live TV. - /// - LiveTv = 8, + /// + /// Live TV. + /// + LiveTv = 8, - /// - /// Continue Reading. - /// - ResumeBook = 9 - } + /// + /// Continue Reading. + /// + ResumeBook = 9 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs index 3967712b03..72ac1140cb 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/IndexingKind.cs @@ -1,23 +1,22 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing a type of indexing in a user's display preferences. +/// +public enum IndexingKind { /// - /// An enum representing a type of indexing in a user's display preferences. + /// Index by the premiere date. /// - public enum IndexingKind - { - /// - /// Index by the premiere date. - /// - PremiereDate = 0, + PremiereDate = 0, - /// - /// Index by the production year. - /// - ProductionYear = 1, + /// + /// Index by the production year. + /// + ProductionYear = 1, - /// - /// Index by the community rating. - /// - CommunityRating = 2 - } + /// + /// Index by the community rating. + /// + CommunityRating = 2 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs index 797c26ec27..8e6f677dca 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaFileKind.cs @@ -1,33 +1,32 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing the type of media file. +/// +public enum MediaFileKind { /// - /// An enum representing the type of media file. + /// The main file. /// - public enum MediaFileKind - { - /// - /// The main file. - /// - Main = 0, + Main = 0, - /// - /// A sidecar file. - /// - Sidecar = 1, + /// + /// A sidecar file. + /// + Sidecar = 1, - /// - /// An additional part to the main file. - /// - AdditionalPart = 2, + /// + /// An additional part to the main file. + /// + AdditionalPart = 2, - /// - /// An alternative format to the main file. - /// - AlternativeFormat = 3, + /// + /// An alternative format to the main file. + /// + AlternativeFormat = 3, - /// - /// An additional stream for the main file. - /// - AdditionalStream = 4 - } + /// + /// An additional stream for the main file. + /// + AdditionalStream = 4 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs index 4586354504..fed092b978 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs @@ -1,6 +1,6 @@ using Jellyfin.Data.Entities; -namespace Jellyfin.Data.Enums; +namespace Jellyfin.Database.Implementations.Enums; /// /// Defines the types of content an individual represents. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs index c3d6705c24..0818639636 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PermissionKind.cs @@ -1,128 +1,127 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// The types of user permissions. +/// +public enum PermissionKind { /// - /// The types of user permissions. + /// Whether the user is an administrator. /// - public enum PermissionKind - { - /// - /// Whether the user is an administrator. - /// - IsAdministrator = 0, + IsAdministrator = 0, - /// - /// Whether the user is hidden. - /// - IsHidden = 1, + /// + /// Whether the user is hidden. + /// + IsHidden = 1, - /// - /// Whether the user is disabled. - /// - IsDisabled = 2, + /// + /// Whether the user is disabled. + /// + IsDisabled = 2, - /// - /// Whether the user can control shared devices. - /// - EnableSharedDeviceControl = 3, + /// + /// Whether the user can control shared devices. + /// + EnableSharedDeviceControl = 3, - /// - /// Whether the user can access the server remotely. - /// - EnableRemoteAccess = 4, + /// + /// Whether the user can access the server remotely. + /// + EnableRemoteAccess = 4, - /// - /// Whether the user can manage live tv. - /// - EnableLiveTvManagement = 5, + /// + /// Whether the user can manage live tv. + /// + EnableLiveTvManagement = 5, - /// - /// Whether the user can access live tv. - /// - EnableLiveTvAccess = 6, + /// + /// Whether the user can access live tv. + /// + EnableLiveTvAccess = 6, - /// - /// Whether the user can play media. - /// - EnableMediaPlayback = 7, + /// + /// Whether the user can play media. + /// + EnableMediaPlayback = 7, - /// - /// Whether the server should transcode audio for the user if requested. - /// - EnableAudioPlaybackTranscoding = 8, + /// + /// Whether the server should transcode audio for the user if requested. + /// + EnableAudioPlaybackTranscoding = 8, - /// - /// Whether the server should transcode video for the user if requested. - /// - EnableVideoPlaybackTranscoding = 9, + /// + /// Whether the server should transcode video for the user if requested. + /// + EnableVideoPlaybackTranscoding = 9, - /// - /// Whether the user can delete content. - /// - EnableContentDeletion = 10, + /// + /// Whether the user can delete content. + /// + EnableContentDeletion = 10, - /// - /// Whether the user can download content. - /// - EnableContentDownloading = 11, + /// + /// Whether the user can download content. + /// + EnableContentDownloading = 11, - /// - /// Whether to enable sync transcoding for the user. - /// - EnableSyncTranscoding = 12, + /// + /// Whether to enable sync transcoding for the user. + /// + EnableSyncTranscoding = 12, - /// - /// Whether the user can do media conversion. - /// - EnableMediaConversion = 13, + /// + /// Whether the user can do media conversion. + /// + EnableMediaConversion = 13, - /// - /// Whether the user has access to all devices. - /// - EnableAllDevices = 14, + /// + /// Whether the user has access to all devices. + /// + EnableAllDevices = 14, - /// - /// Whether the user has access to all channels. - /// - EnableAllChannels = 15, + /// + /// Whether the user has access to all channels. + /// + EnableAllChannels = 15, - /// - /// Whether the user has access to all folders. - /// - EnableAllFolders = 16, + /// + /// Whether the user has access to all folders. + /// + EnableAllFolders = 16, - /// - /// Whether to enable public sharing for the user. - /// - EnablePublicSharing = 17, + /// + /// Whether to enable public sharing for the user. + /// + EnablePublicSharing = 17, - /// - /// Whether the user can remotely control other users. - /// - EnableRemoteControlOfOtherUsers = 18, + /// + /// Whether the user can remotely control other users. + /// + EnableRemoteControlOfOtherUsers = 18, - /// - /// Whether the user is permitted to do playback remuxing. - /// - EnablePlaybackRemuxing = 19, + /// + /// Whether the user is permitted to do playback remuxing. + /// + EnablePlaybackRemuxing = 19, - /// - /// Whether the server should force transcoding on remote connections for the user. - /// - ForceRemoteSourceTranscoding = 20, + /// + /// Whether the server should force transcoding on remote connections for the user. + /// + ForceRemoteSourceTranscoding = 20, - /// - /// Whether the user can create, modify and delete collections. - /// - EnableCollectionManagement = 21, + /// + /// Whether the user can create, modify and delete collections. + /// + EnableCollectionManagement = 21, - /// - /// Whether the user can edit subtitles. - /// - EnableSubtitleManagement = 22, + /// + /// Whether the user can edit subtitles. + /// + EnableSubtitleManagement = 22, - /// - /// Whether the user can edit lyrics. - /// - EnableLyricManagement = 23, - } + /// + /// Whether the user can edit lyrics. + /// + EnableLyricManagement = 23, } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs index 1e619f5eef..5b913385e8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PersonRoleType.cs @@ -1,68 +1,67 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing a person's role in a specific media item. +/// +public enum PersonRoleType { /// - /// An enum representing a person's role in a specific media item. + /// Another role, not covered by the other types. /// - public enum PersonRoleType - { - /// - /// Another role, not covered by the other types. - /// - Other = 0, + Other = 0, - /// - /// The director of the media. - /// - Director = 1, + /// + /// The director of the media. + /// + Director = 1, - /// - /// An artist. - /// - Artist = 2, + /// + /// An artist. + /// + Artist = 2, - /// - /// The original artist. - /// - OriginalArtist = 3, + /// + /// The original artist. + /// + OriginalArtist = 3, - /// - /// An actor. - /// - Actor = 4, + /// + /// An actor. + /// + Actor = 4, - /// - /// A voice actor. - /// - VoiceActor = 5, + /// + /// A voice actor. + /// + VoiceActor = 5, - /// - /// A producer. - /// - Producer = 6, + /// + /// A producer. + /// + Producer = 6, - /// - /// A remixer. - /// - Remixer = 7, + /// + /// A remixer. + /// + Remixer = 7, - /// - /// A conductor. - /// - Conductor = 8, + /// + /// A conductor. + /// + Conductor = 8, - /// - /// A composer. - /// - Composer = 9, + /// + /// A composer. + /// + Composer = 9, - /// - /// An author. - /// - Author = 10, + /// + /// An author. + /// + Author = 10, - /// - /// An editor. - /// - Editor = 11 - } + /// + /// An editor. + /// + Editor = 11 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs index d2b412e459..f70e3e2c23 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/PreferenceKind.cs @@ -1,73 +1,72 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// The types of user preferences. +/// +public enum PreferenceKind { /// - /// The types of user preferences. + /// A list of blocked tags. /// - public enum PreferenceKind - { - /// - /// A list of blocked tags. - /// - BlockedTags = 0, + BlockedTags = 0, - /// - /// A list of blocked channels. - /// - BlockedChannels = 1, + /// + /// A list of blocked channels. + /// + BlockedChannels = 1, - /// - /// A list of blocked media folders. - /// - BlockedMediaFolders = 2, + /// + /// A list of blocked media folders. + /// + BlockedMediaFolders = 2, - /// - /// A list of enabled devices. - /// - EnabledDevices = 3, + /// + /// A list of enabled devices. + /// + EnabledDevices = 3, - /// - /// A list of enabled channels. - /// - EnabledChannels = 4, + /// + /// A list of enabled channels. + /// + EnabledChannels = 4, - /// - /// A list of enabled folders. - /// - EnabledFolders = 5, + /// + /// A list of enabled folders. + /// + EnabledFolders = 5, - /// - /// A list of folders to allow content deletion from. - /// - EnableContentDeletionFromFolders = 6, + /// + /// A list of folders to allow content deletion from. + /// + EnableContentDeletionFromFolders = 6, - /// - /// A list of latest items to exclude. - /// - LatestItemExcludes = 7, + /// + /// A list of latest items to exclude. + /// + LatestItemExcludes = 7, - /// - /// A list of media to exclude. - /// - MyMediaExcludes = 8, + /// + /// A list of media to exclude. + /// + MyMediaExcludes = 8, - /// - /// A list of grouped folders. - /// - GroupedFolders = 9, + /// + /// A list of grouped folders. + /// + GroupedFolders = 9, - /// - /// A list of unrated items to block. - /// - BlockUnratedItems = 10, + /// + /// A list of unrated items to block. + /// + BlockUnratedItems = 10, - /// - /// A list of ordered views. - /// - OrderedViews = 11, + /// + /// A list of ordered views. + /// + OrderedViews = 11, - /// - /// A list of allowed tags. - /// - AllowedTags = 12 - } + /// + /// A list of allowed tags. + /// + AllowedTags = 12 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs index 29c50e2c4e..3ff3c45faf 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ScrollDirection.cs @@ -1,18 +1,17 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing the axis that should be scrolled. +/// +public enum ScrollDirection { /// - /// An enum representing the axis that should be scrolled. + /// Horizontal scrolling direction. /// - public enum ScrollDirection - { - /// - /// Horizontal scrolling direction. - /// - Horizontal = 0, + Horizontal = 0, - /// - /// Vertical scrolling direction. - /// - Vertical = 1 - } + /// + /// Vertical scrolling direction. + /// + Vertical = 1 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs index 4151448e4e..c865b75f11 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SortOrder.cs @@ -1,18 +1,17 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing the sorting order. +/// +public enum SortOrder { /// - /// An enum representing the sorting order. + /// Sort in increasing order. /// - public enum SortOrder - { - /// - /// Sort in increasing order. - /// - Ascending = 0, + Ascending = 0, - /// - /// Sort in decreasing order. - /// - Descending = 1 - } + /// + /// Sort in decreasing order. + /// + Descending = 1 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs index 79693d321a..c394c209bb 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SubtitlePlaybackMode.cs @@ -1,33 +1,32 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing a subtitle playback mode. +/// +public enum SubtitlePlaybackMode { /// - /// An enum representing a subtitle playback mode. + /// The default subtitle playback mode. /// - public enum SubtitlePlaybackMode - { - /// - /// The default subtitle playback mode. - /// - Default = 0, + Default = 0, - /// - /// Always show subtitles. - /// - Always = 1, + /// + /// Always show subtitles. + /// + Always = 1, - /// - /// Only show forced subtitles. - /// - OnlyForced = 2, + /// + /// Only show forced subtitles. + /// + OnlyForced = 2, - /// - /// Don't show subtitles. - /// - None = 3, + /// + /// Don't show subtitles. + /// + None = 3, - /// - /// Only show subtitles when the current audio stream is in a different language. - /// - Smart = 4 - } + /// + /// Only show subtitles when the current audio stream is in a different language. + /// + Smart = 4 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs index 030d16fb90..311642e0d7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/SyncPlayUserAccessType.cs @@ -1,23 +1,22 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// Enum SyncPlayUserAccessType. +/// +public enum SyncPlayUserAccessType { /// - /// Enum SyncPlayUserAccessType. + /// User can create groups and join them. /// - public enum SyncPlayUserAccessType - { - /// - /// User can create groups and join them. - /// - CreateAndJoinGroups = 0, + CreateAndJoinGroups = 0, - /// - /// User can only join already existing groups. - /// - JoinGroups = 1, + /// + /// User can only join already existing groups. + /// + JoinGroups = 1, - /// - /// SyncPlay is disabled for the user. - /// - None = 2 - } + /// + /// SyncPlay is disabled for the user. + /// + None = 2 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs index c0fd7d448b..b2bcbf2bb6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/ViewType.cs @@ -1,113 +1,112 @@ -namespace Jellyfin.Data.Enums +namespace Jellyfin.Database.Implementations.Enums; + +/// +/// An enum representing the type of view for a library or collection. +/// +public enum ViewType { /// - /// An enum representing the type of view for a library or collection. + /// Shows albums. /// - public enum ViewType - { - /// - /// Shows albums. - /// - Albums = 0, + Albums = 0, - /// - /// Shows album artists. - /// - AlbumArtists = 1, + /// + /// Shows album artists. + /// + AlbumArtists = 1, - /// - /// Shows artists. - /// - Artists = 2, + /// + /// Shows artists. + /// + Artists = 2, - /// - /// Shows channels. - /// - Channels = 3, + /// + /// Shows channels. + /// + Channels = 3, - /// - /// Shows collections. - /// - Collections = 4, + /// + /// Shows collections. + /// + Collections = 4, - /// - /// Shows episodes. - /// - Episodes = 5, + /// + /// Shows episodes. + /// + Episodes = 5, - /// - /// Shows favorites. - /// - Favorites = 6, + /// + /// Shows favorites. + /// + Favorites = 6, - /// - /// Shows genres. - /// - Genres = 7, + /// + /// Shows genres. + /// + Genres = 7, - /// - /// Shows guide. - /// - Guide = 8, + /// + /// Shows guide. + /// + Guide = 8, - /// - /// Shows movies. - /// - Movies = 9, + /// + /// Shows movies. + /// + Movies = 9, - /// - /// Shows networks. - /// - Networks = 10, + /// + /// Shows networks. + /// + Networks = 10, - /// - /// Shows playlists. - /// - Playlists = 11, + /// + /// Shows playlists. + /// + Playlists = 11, - /// - /// Shows programs. - /// - Programs = 12, + /// + /// Shows programs. + /// + Programs = 12, - /// - /// Shows recordings. - /// - Recordings = 13, + /// + /// Shows recordings. + /// + Recordings = 13, - /// - /// Shows schedule. - /// - Schedule = 14, + /// + /// Shows schedule. + /// + Schedule = 14, - /// - /// Shows series. - /// - Series = 15, + /// + /// Shows series. + /// + Series = 15, - /// - /// Shows shows. - /// - Shows = 16, + /// + /// Shows shows. + /// + Shows = 16, - /// - /// Shows songs. - /// - Songs = 17, + /// + /// Shows songs. + /// + Songs = 17, - /// - /// Shows songs. - /// - Suggestions = 18, + /// + /// Shows songs. + /// + Suggestions = 18, - /// - /// Shows trailers. - /// - Trailers = 19, + /// + /// Shows trailers. + /// + Trailers = 19, - /// - /// Shows upcoming. - /// - Upcoming = 20 - } + /// + /// Shows upcoming. + /// + Upcoming = 20 } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs index cc96792e64..0740165530 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -1,9 +1,8 @@ -using System; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; -namespace Jellyfin.Server.Implementations; +namespace Jellyfin.Database.Implementations; /// /// Defines the type and extension points for multi database support. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs index a4d9c54af4..03c2ca4a47 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Data.Entities.Libraries; -namespace Jellyfin.Data.Interfaces +namespace Jellyfin.Database.Implementations.Interfaces { /// /// An interface abstracting an entity that has artwork. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs index 8f19ce04fa..ed449a8f14 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Data.Entities.Libraries; -namespace Jellyfin.Data.Interfaces +namespace Jellyfin.Database.Implementations.Interfaces { /// /// An abstraction representing an entity that has companies. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs index 2c4091493e..196d2680db 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasConcurrencyToken.cs @@ -1,18 +1,17 @@ -namespace Jellyfin.Data.Interfaces +namespace Jellyfin.Database.Implementations.Interfaces; + +/// +/// An interface abstracting an entity that has a concurrency token. +/// +public interface IHasConcurrencyToken { /// - /// An interface abstracting an entity that has a concurrency token. + /// Gets the version of this row. Acts as a concurrency token. /// - public interface IHasConcurrencyToken - { - /// - /// Gets the version of this row. Acts as a concurrency token. - /// - uint RowVersion { get; } + uint RowVersion { get; } - /// - /// Called when saving changes to this entity. - /// - void OnSavingChanges(); - } + /// + /// Called when saving changes to this entity. + /// + void OnSavingChanges(); } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs index 6d1eb59f67..606b1169b8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs @@ -1,17 +1,15 @@ using System.Collections.Generic; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; -namespace Jellyfin.Data.Interfaces +namespace Jellyfin.Database.Implementations.Interfaces; + +/// +/// An abstraction representing an entity that has permissions. +/// +public interface IHasPermissions { /// - /// An abstraction representing an entity that has permissions. + /// Gets a collection containing this entity's permissions. /// - public interface IHasPermissions - { - /// - /// Gets a collection containing this entity's permissions. - /// - ICollection Permissions { get; } - } + ICollection Permissions { get; } } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs index 3b615893ed..653572b6e9 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs @@ -1,16 +1,15 @@ using System.Collections.Generic; using Jellyfin.Data.Entities.Libraries; -namespace Jellyfin.Data.Interfaces +namespace Jellyfin.Database.Implementations.Interfaces; + +/// +/// An abstraction representing an entity that has releases. +/// +public interface IHasReleases { /// - /// An abstraction representing an entity that has releases. + /// Gets a collection containing this entity's releases. /// - public interface IHasReleases - { - /// - /// Gets a collection containing this entity's releases. - /// - ICollection Releases { get; } - } + ICollection Releases { get; } } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs index b3ab3d0944..778aca373e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Server.Implementations; +namespace Jellyfin.Database.Implementations; /// /// Defines the key of the database provider. @@ -16,7 +16,7 @@ public sealed class JellyfinDatabaseProviderKeyAttribute : System.Attribute /// The key on which to identify the annotated provider. public JellyfinDatabaseProviderKeyAttribute(string databaseProviderKey) { - this._databaseProviderKey = databaseProviderKey; + _databaseProviderKey = databaseProviderKey; } /// diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs index 024d595d58..5cdc853319 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs @@ -2,13 +2,11 @@ using System; using System.Linq; using Jellyfin.Data.Entities; using Jellyfin.Data.Entities.Security; -using Jellyfin.Data.Interfaces; +using Jellyfin.Database.Implementations.Interfaces; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore.Metadata.Conventions; using Microsoft.Extensions.Logging; -namespace Jellyfin.Server.Implementations; +namespace Jellyfin.Database.Implementations; /// /// diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs index 9a63ed9f21..be99b46d56 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// FluentAPI configuration for the ActivityLog entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs index 8cc817fb8b..146df5546c 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// AncestorId configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs index 3f19b6986a..7c15f064d8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities.Security; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the ApiKey entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs index 057b6689ac..b5fae4053c 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// FluentAPI configuration for the AttachmentStreamInfo entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs index 08f2a33566..67a071039f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// Configuration for BaseItem. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs index b4c6511bf2..c101e0085e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// Provides configuration for the BaseItemMetadataField entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs index d15049a1fa..175a82e091 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// BaseItemProvider configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs index e9564b854b..c7efef2390 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// Provides configuration for the BaseItemMetadataField entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs index 5a84f7750a..5935b632a7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// Chapter configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs index 779aec986b..550fa5073b 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the CustomItemDisplayPreferences entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs index a750b65c03..5f87c8d403 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities.Security; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the Device entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs index 038afd7524..923a53acaf 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities.Security; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the DeviceOptions entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs index 9b437861bb..92068c8f29 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the DisplayPreferencesConfiguration entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs index abeeb09c9b..0e63c130e3 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// itemvalues Configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs index 9c22b114c7..3860b0e161 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// itemvalues Configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs index 7e572f9a39..37e15f5e72 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// People configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs index cdaee9161c..125b9e92cd 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// People configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs index f3cccb13fe..fe25d3064d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// People configuration. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs index 240e284c0c..90a3ec5d00 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the Permission entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs index 49c869c6a8..d6d3fadfc4 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the Permission entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs index dc1c17e5ef..a198c80f7e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the TrickplayInfo entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs index bcaa3634ed..4e830801ee 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs @@ -2,7 +2,7 @@ using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration +namespace Jellyfin.Database.Implementations.ModelConfiguration { /// /// FluentAPI configuration for the User entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs index 7bbb28d431..a7e223c435 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs @@ -1,9 +1,8 @@ -using System; using Jellyfin.Data.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -namespace Jellyfin.Server.Implementations.ModelConfiguration; +namespace Jellyfin.Database.Implementations.ModelConfiguration; /// /// FluentAPI configuration for the UserData entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.Designer.cs index 80fe784dd7..7891006430 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200514181226_AddActivityLog.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.Designer.cs index 7aa4479b3d..eab3cd3e7e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200613202153_AddUsers.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs index 3860c851d0..91dd0ff7ab 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200728005145_AddDisplayPreferences.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs index 1134f7aa42..8ec9231030 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20200905220533_FixDisplayPreferencesIndex.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs index 607310caae..499faa9c47 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs index 02c3fc7532..7ab851689a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201204223655_AddCustomDisplayPreferences.Designer.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs index 1cfd7112ce..e14ed9380e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210320181425_AddIndexesAndCollations.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs index ecf7af4952..05f2c80a25 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.Designer.cs index dccba6f773..c9f3cf696c 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210814002109_AddDevices.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs index e821c106e3..ab7781d155 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20221022080052_AddIndexActivityLogsDateCreated.Designer.cs @@ -2,7 +2,7 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs index 360fa03768..8a2806113f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230526173516_RemoveEasyPassword.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs index 17d33845f5..a11507bd5d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230626233818_AddTrickplayInfos.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.Designer.cs index 4c09176691..ddea37f6dd 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20230923170422_UserCastReceiver.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs index 35a3cdad2d..ab7065ee65 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240729140605_AddMediaSegments.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs index 8dba31a67f..aa60bff324 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.Designer.cs index 27745f601a..2ea6dafe13 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241020103111_LibraryDbMigration.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs index 1fbf21492d..d589a4afd7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111131257_AddedCustomDataKey.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs index bac6fd5b5a..3d70bb0296 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241111135439_AddedCustomDataKeyKey.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs index ad622d44c5..1e0d3b129f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112152323_FixAncestorIdConfig.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.Designer.cs index dc4c8212ba..ccf67d899f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112232041_fixMediaStreams.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.Designer.cs index 5714120b5c..d3ba8c96a9 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241112234144_FixMediaStreams2.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs index 855f02fd3f..2c0058c720 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20241113133548_EnforceUniqueItemValue.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.Designer.cs index d7b806d7a3..da4bab3fd3 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250202021306_FixedCollation.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs index a329f1ef16..9b72d9688a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250204092455_MakeStartEndDateNullable.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.Designer.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.Designer.cs index 48919c9b5d..f5cfe86c44 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.Designer.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20250214031148_ChannelIdGuid.Designer.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs index 79587a9c33..5d8ddde082 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs index 448bd2fc8b..1629c732c6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs @@ -1,3 +1,4 @@ +using Jellyfin.Database.Implementations; using Jellyfin.Database.Providers.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs index 79ae1661aa..0d75686198 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs @@ -3,46 +3,45 @@ using Jellyfin.Server.Implementations.ValueConverters; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace Jellyfin.Server.Implementations +namespace Jellyfin.Database.Providers.Sqlite; + +/// +/// Model builder extensions. +/// +public static class ModelBuilderExtensions { /// - /// Model builder extensions. + /// Specify value converter for the object type. /// - public static class ModelBuilderExtensions + /// The model builder. + /// The . + /// The type to convert. + /// The modified . + public static ModelBuilder UseValueConverterForType(this ModelBuilder modelBuilder, ValueConverter converter) { - /// - /// Specify value converter for the object type. - /// - /// The model builder. - /// The . - /// The type to convert. - /// The modified . - public static ModelBuilder UseValueConverterForType(this ModelBuilder modelBuilder, ValueConverter converter) + var type = typeof(T); + foreach (var entityType in modelBuilder.Model.GetEntityTypes()) { - var type = typeof(T); - foreach (var entityType in modelBuilder.Model.GetEntityTypes()) + foreach (var property in entityType.GetProperties()) { - foreach (var property in entityType.GetProperties()) + if (property.ClrType == type) { - if (property.ClrType == type) - { - property.SetValueConverter(converter); - } + property.SetValueConverter(converter); } } - - return modelBuilder; } - /// - /// Specify the default . - /// - /// The model builder to extend. - /// The to specify. - public static void SetDefaultDateTimeKind(this ModelBuilder modelBuilder, DateTimeKind kind) - { - modelBuilder.UseValueConverterForType(new DateTimeKindValueConverter(kind)); - modelBuilder.UseValueConverterForType(new DateTimeKindValueConverter(kind)); - } + return modelBuilder; + } + + /// + /// Specify the default . + /// + /// The model builder to extend. + /// The to specify. + public static void SetDefaultDateTimeKind(this ModelBuilder modelBuilder, DateTimeKind kind) + { + modelBuilder.UseValueConverterForType(new DateTimeKindValueConverter(kind)); + modelBuilder.UseValueConverterForType(new DateTimeKindValueConverter(kind)); } } diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs index 2aa3522d8a..d9eb0ae7a4 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs @@ -2,7 +2,7 @@ using System; using System.IO; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Server.Implementations; +using Jellyfin.Database.Implementations; using MediaBrowser.Common.Configuration; using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; diff --git a/src/Jellyfin.LiveTv/Channels/ChannelManager.cs b/src/Jellyfin.LiveTv/Channels/ChannelManager.cs index 83f68ab509..402a3f3b0e 100644 --- a/src/Jellyfin.LiveTv/Channels/ChannelManager.cs +++ b/src/Jellyfin.LiveTv/Channels/ChannelManager.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using AsyncKeyedLock; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; using MediaBrowser.Common.Extensions; diff --git a/src/Jellyfin.LiveTv/DefaultLiveTvService.cs b/src/Jellyfin.LiveTv/DefaultLiveTvService.cs index 318cc7acd0..d8f873abe6 100644 --- a/src/Jellyfin.LiveTv/DefaultLiveTvService.cs +++ b/src/Jellyfin.LiveTv/DefaultLiveTvService.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.LiveTv.Configuration; using Jellyfin.LiveTv.Timers; diff --git a/src/Jellyfin.LiveTv/LiveTvManager.cs b/src/Jellyfin.LiveTv/LiveTvManager.cs index da98606a4b..7ebcc48834 100644 --- a/src/Jellyfin.LiveTv/LiveTvManager.cs +++ b/src/Jellyfin.LiveTv/LiveTvManager.cs @@ -12,6 +12,7 @@ using Jellyfin.Data; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.LiveTv.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Channels; diff --git a/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs b/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs index 1d571805b8..a5d186ce18 100644 --- a/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs +++ b/src/Jellyfin.LiveTv/Recordings/RecordingNotifier.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Enums; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Session; diff --git a/src/Jellyfin.LiveTv/Recordings/RecordingsManager.cs b/src/Jellyfin.LiveTv/Recordings/RecordingsManager.cs index 2f4caa3867..9ca5d7420b 100644 --- a/src/Jellyfin.LiveTv/Recordings/RecordingsManager.cs +++ b/src/Jellyfin.LiveTv/Recordings/RecordingsManager.cs @@ -10,6 +10,7 @@ using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.LiveTv.Configuration; using Jellyfin.LiveTv.IO; using Jellyfin.LiveTv.Timers; diff --git a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs index 6b3afc9357..0a6489d0ac 100644 --- a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs @@ -8,7 +8,7 @@ using Jellyfin.Api.Auth; using Jellyfin.Api.Constants; using Jellyfin.Data; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; using Microsoft.AspNetCore.Authentication; diff --git a/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs index 31d2b486b3..1fe9fc97ef 100644 --- a/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs @@ -8,7 +8,7 @@ using Jellyfin.Api.Auth.DefaultAuthorizationPolicy; using Jellyfin.Api.Auth.FirstTimeSetupPolicy; using Jellyfin.Api.Constants; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Library; using Microsoft.AspNetCore.Authorization; diff --git a/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs index 534d1863ca..ed5235252a 100644 --- a/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs @@ -6,7 +6,7 @@ using AutoFixture.AutoMoq; using Jellyfin.Api.Auth.DefaultAuthorizationPolicy; using Jellyfin.Api.Constants; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Library; using Microsoft.AspNetCore.Authorization; diff --git a/tests/Jellyfin.Api.Tests/Helpers/RequestHelpersTests.cs b/tests/Jellyfin.Api.Tests/Helpers/RequestHelpersTests.cs index a2d1b3607b..2851b08e6c 100644 --- a/tests/Jellyfin.Api.Tests/Helpers/RequestHelpersTests.cs +++ b/tests/Jellyfin.Api.Tests/Helpers/RequestHelpersTests.cs @@ -5,6 +5,7 @@ using System.Security.Claims; using Jellyfin.Api.Constants; using Jellyfin.Api.Helpers; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Net; using Xunit; diff --git a/tests/Jellyfin.Api.Tests/TestHelpers.cs b/tests/Jellyfin.Api.Tests/TestHelpers.cs index d84da89e28..03884d7754 100644 --- a/tests/Jellyfin.Api.Tests/TestHelpers.cs +++ b/tests/Jellyfin.Api.Tests/TestHelpers.cs @@ -6,7 +6,7 @@ using System.Security.Claims; using Jellyfin.Api.Constants; using Jellyfin.Data; using Jellyfin.Data.Entities; -using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Enums; using Jellyfin.Server.Implementations.Users; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Library; From 42bdb22bfb690a6af37d70f12844881d884927b1 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Tue, 25 Mar 2025 16:45:00 +0100 Subject: [PATCH 32/34] Fixed namespaces --- .../Collections/CollectionManager.cs | 2 +- Emby.Server.Implementations/Dto/DtoService.cs | 2 +- .../EntryPoints/LibraryChangedNotifier.cs | 2 +- Emby.Server.Implementations/Library/LibraryManager.cs | 2 +- Emby.Server.Implementations/Library/MediaSourceManager.cs | 2 +- Emby.Server.Implementations/Library/MusicManager.cs | 2 +- Emby.Server.Implementations/Library/SearchEngine.cs | 2 +- Emby.Server.Implementations/Library/UserDataManager.cs | 2 +- Emby.Server.Implementations/Library/UserViewManager.cs | 2 +- Emby.Server.Implementations/Playlists/PlaylistManager.cs | 2 +- Emby.Server.Implementations/Playlists/PlaylistsFolder.cs | 2 +- Emby.Server.Implementations/Session/SessionManager.cs | 4 ++-- .../Sorting/DateLastMediaAddedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/DatePlayedComparer.cs | 2 +- .../Sorting/IsFavoriteOrLikeComparer.cs | 2 +- Emby.Server.Implementations/Sorting/IsPlayedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/PlayCountComparer.cs | 2 +- Emby.Server.Implementations/SyncPlay/Group.cs | 2 +- Emby.Server.Implementations/TV/TVSeriesManager.cs | 2 +- Jellyfin.Api/Controllers/ArtistsController.cs | 2 +- Jellyfin.Api/Controllers/DisplayPreferencesController.cs | 2 +- Jellyfin.Api/Controllers/GenresController.cs | 2 +- Jellyfin.Api/Controllers/ImageController.cs | 2 +- Jellyfin.Api/Controllers/InstantMixController.cs | 2 +- Jellyfin.Api/Controllers/LibraryController.cs | 2 +- Jellyfin.Api/Controllers/MoviesController.cs | 2 +- Jellyfin.Api/Controllers/MusicGenresController.cs | 2 +- Jellyfin.Api/Controllers/PersonsController.cs | 2 +- Jellyfin.Api/Controllers/PlaystateController.cs | 2 +- Jellyfin.Api/Controllers/StudiosController.cs | 2 +- Jellyfin.Api/Controllers/SuggestionsController.cs | 2 +- Jellyfin.Api/Controllers/UserLibraryController.cs | 2 +- Jellyfin.Api/Controllers/YearsController.cs | 2 +- Jellyfin.Api/Helpers/DynamicHlsHelper.cs | 2 +- Jellyfin.Api/Helpers/MediaInfoHelper.cs | 2 +- Jellyfin.Api/Helpers/RequestHelpers.cs | 2 +- Jellyfin.Data/Events/Users/UserCreatedEventArgs.cs | 2 +- Jellyfin.Data/Events/Users/UserDeletedEventArgs.cs | 2 +- Jellyfin.Data/Events/Users/UserLockedOutEventArgs.cs | 2 +- Jellyfin.Data/Events/Users/UserPasswordChangedEventArgs.cs | 2 +- Jellyfin.Data/Events/Users/UserUpdatedEventArgs.cs | 2 +- Jellyfin.Data/UserEntityExtensions.cs | 2 +- .../Activity/ActivityManager.cs | 2 +- Jellyfin.Server.Implementations/Devices/DeviceManager.cs | 4 ++-- .../Events/Consumers/Library/LyricDownloadFailureLogger.cs | 2 +- .../Consumers/Library/SubtitleDownloadFailureLogger.cs | 2 +- .../Consumers/Security/AuthenticationFailedLogger.cs | 2 +- .../Consumers/Security/AuthenticationSucceededLogger.cs | 2 +- .../Events/Consumers/Session/PlaybackStartLogger.cs | 2 +- .../Events/Consumers/Session/PlaybackStopLogger.cs | 2 +- .../Events/Consumers/Session/SessionEndedLogger.cs | 2 +- .../Events/Consumers/Session/SessionStartedLogger.cs | 2 +- .../Events/Consumers/System/TaskCompletedLogger.cs | 2 +- .../Consumers/Updates/PluginInstallationFailedLogger.cs | 2 +- .../Events/Consumers/Updates/PluginInstalledLogger.cs | 2 +- .../Events/Consumers/Updates/PluginUninstalledLogger.cs | 2 +- .../Events/Consumers/Updates/PluginUpdatedLogger.cs | 2 +- .../Events/Consumers/Users/UserCreatedLogger.cs | 2 +- .../Events/Consumers/Users/UserDeletedLogger.cs | 2 +- .../Events/Consumers/Users/UserLockedOutLogger.cs | 2 +- .../Events/Consumers/Users/UserPasswordChangedLogger.cs | 2 +- Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 4 ++-- Jellyfin.Server.Implementations/Item/ChapterRepository.cs | 2 +- .../Item/MediaAttachmentRepository.cs | 2 +- .../Item/MediaStreamRepository.cs | 2 +- Jellyfin.Server.Implementations/Item/PeopleRepository.cs | 2 +- .../MediaSegments/MediaSegmentManager.cs | 2 +- .../Security/AuthenticationManager.cs | 2 +- .../Trickplay/TrickplayManager.cs | 2 +- .../Users/DefaultAuthenticationProvider.cs | 2 +- .../Users/DefaultPasswordResetProvider.cs | 2 +- Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs | 2 +- .../Users/DisplayPreferencesManager.cs | 2 +- .../Users/InvalidAuthProvider.cs | 2 +- Jellyfin.Server.Implementations/Users/UserManager.cs | 2 +- .../Migrations/Routines/MigrateActivityLogDb.cs | 2 +- .../Migrations/Routines/MigrateAuthenticationDb.cs | 2 +- .../Migrations/Routines/MigrateDisplayPreferencesDb.cs | 2 +- Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs | 7 ++++--- Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs | 2 +- .../Authentication/IAuthenticationProvider.cs | 2 +- .../Authentication/IPasswordResetProvider.cs | 2 +- MediaBrowser.Controller/Channels/Channel.cs | 2 +- MediaBrowser.Controller/Collections/ICollectionManager.cs | 2 +- MediaBrowser.Controller/Devices/IDeviceManager.cs | 4 ++-- MediaBrowser.Controller/Drawing/IImageProcessor.cs | 2 +- MediaBrowser.Controller/Dto/IDtoService.cs | 2 +- MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs | 2 +- MediaBrowser.Controller/Entities/Audio/MusicArtist.cs | 2 +- MediaBrowser.Controller/Entities/BaseItem.cs | 2 +- MediaBrowser.Controller/Entities/CollectionFolder.cs | 2 +- MediaBrowser.Controller/Entities/Folder.cs | 2 +- MediaBrowser.Controller/Entities/InternalItemsQuery.cs | 2 +- MediaBrowser.Controller/Entities/InternalPeopleQuery.cs | 2 +- MediaBrowser.Controller/Entities/Movies/BoxSet.cs | 2 +- MediaBrowser.Controller/Entities/TV/Season.cs | 2 +- MediaBrowser.Controller/Entities/TV/Series.cs | 2 +- MediaBrowser.Controller/Entities/UserRootFolder.cs | 2 +- MediaBrowser.Controller/Entities/UserView.cs | 2 +- MediaBrowser.Controller/Entities/UserViewBuilder.cs | 2 +- MediaBrowser.Controller/IDisplayPreferencesManager.cs | 2 +- MediaBrowser.Controller/Library/IIntroProvider.cs | 3 ++- MediaBrowser.Controller/Library/ILibraryManager.cs | 2 +- MediaBrowser.Controller/Library/IMediaSourceManager.cs | 2 +- MediaBrowser.Controller/Library/IMusicManager.cs | 2 +- MediaBrowser.Controller/Library/IUserDataManager.cs | 2 +- MediaBrowser.Controller/Library/IUserManager.cs | 2 +- .../Library/PlaybackProgressEventArgs.cs | 2 +- MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 2 +- MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs | 2 +- .../MediaSegments/IMediaSegmentManager.cs | 2 +- MediaBrowser.Controller/Net/AuthorizationInfo.cs | 2 +- MediaBrowser.Controller/Playlists/Playlist.cs | 2 +- MediaBrowser.Controller/Session/ISessionManager.cs | 5 +++-- MediaBrowser.Controller/Sorting/IUserBaseItemComparer.cs | 3 ++- MediaBrowser.Controller/Trickplay/ITrickplayManager.cs | 2 +- MediaBrowser.Model/Activity/IActivityManager.cs | 2 +- MediaBrowser.Model/Dto/BaseItemDto.cs | 2 +- MediaBrowser.Model/Library/UserViewQuery.cs | 2 +- MediaBrowser.Model/Querying/LatestItemsQuery.cs | 2 +- MediaBrowser.Model/Querying/NextUpQuery.cs | 2 +- MediaBrowser.Model/Users/UserPolicy.cs | 2 +- .../Entities/AccessSchedule.cs | 2 +- .../Entities/ActivityLog.cs | 2 +- .../Entities/AncestorId.cs | 2 +- .../Entities/AttachmentStreamInfo.cs | 2 +- .../Entities/BaseItemEntity.cs | 2 +- .../Entities/BaseItemExtraType.cs | 2 +- .../Entities/BaseItemImageInfo.cs | 2 +- .../Entities/BaseItemMetadataField.cs | 2 +- .../Entities/BaseItemProvider.cs | 2 +- .../Entities/BaseItemTrailerType.cs | 2 +- .../Jellyfin.Database.Implementations/Entities/Chapter.cs | 2 +- .../Entities/CustomItemDisplayPreferences.cs | 2 +- .../Entities/DisplayPreferences.cs | 2 +- .../Jellyfin.Database.Implementations/Entities/Group.cs | 2 +- .../Entities/HomeSection.cs | 2 +- .../Entities/ImageInfo.cs | 2 +- .../Entities/ImageInfoImageType.cs | 2 +- .../Entities/ItemDisplayPreferences.cs | 2 +- .../Entities/ItemValue.cs | 2 +- .../Entities/ItemValueMap.cs | 2 +- .../Entities/ItemValueType.cs | 2 +- .../Entities/Libraries/Artwork.cs | 2 +- .../Entities/Libraries/Book.cs | 2 +- .../Entities/Libraries/BookMetadata.cs | 2 +- .../Entities/Libraries/Chapter.cs | 2 +- .../Entities/Libraries/Collection.cs | 2 +- .../Entities/Libraries/CollectionItem.cs | 2 +- .../Entities/Libraries/Company.cs | 2 +- .../Entities/Libraries/CompanyMetadata.cs | 2 +- .../Entities/Libraries/CustomItem.cs | 2 +- .../Entities/Libraries/CustomItemMetadata.cs | 2 +- .../Entities/Libraries/Episode.cs | 2 +- .../Entities/Libraries/EpisodeMetadata.cs | 2 +- .../Entities/Libraries/Genre.cs | 2 +- .../Entities/Libraries/ItemMetadata.cs | 2 +- .../Entities/Libraries/Library.cs | 2 +- .../Entities/Libraries/LibraryItem.cs | 2 +- .../Entities/Libraries/MediaFile.cs | 2 +- .../Entities/Libraries/MediaFileStream.cs | 2 +- .../Entities/Libraries/MetadataProvider.cs | 2 +- .../Entities/Libraries/MetadataProviderId.cs | 2 +- .../Entities/Libraries/Movie.cs | 2 +- .../Entities/Libraries/MovieMetadata.cs | 2 +- .../Entities/Libraries/MusicAlbum.cs | 2 +- .../Entities/Libraries/MusicAlbumMetadata.cs | 2 +- .../Entities/Libraries/Person.cs | 2 +- .../Entities/Libraries/PersonRole.cs | 2 +- .../Entities/Libraries/Photo.cs | 2 +- .../Entities/Libraries/PhotoMetadata.cs | 2 +- .../Entities/Libraries/Rating.cs | 2 +- .../Entities/Libraries/RatingSource.cs | 2 +- .../Entities/Libraries/Release.cs | 2 +- .../Entities/Libraries/Season.cs | 2 +- .../Entities/Libraries/SeasonMetadata.cs | 2 +- .../Entities/Libraries/Series.cs | 2 +- .../Entities/Libraries/SeriesMetadata.cs | 2 +- .../Entities/Libraries/Track.cs | 2 +- .../Entities/Libraries/TrackMetadata.cs | 2 +- .../Entities/MediaSegment.cs | 2 +- .../Entities/MediaStreamInfo.cs | 2 +- .../Entities/MediaStreamTypeEntity.cs | 2 +- .../Jellyfin.Database.Implementations/Entities/People.cs | 2 +- .../Entities/PeopleBaseItemMap.cs | 2 +- .../Entities/Permission.cs | 2 +- .../Entities/Preference.cs | 2 +- .../Entities/ProgramAudioEntity.cs | 2 +- .../Entities/Security/ApiKey.cs | 2 +- .../Entities/Security/Device.cs | 2 +- .../Entities/Security/DeviceOptions.cs | 2 +- .../Entities/TrickplayInfo.cs | 2 +- .../Jellyfin.Database.Implementations/Entities/User.cs | 2 +- .../Jellyfin.Database.Implementations/Entities/UserData.cs | 2 +- .../Enums/MediaSegmentType.cs | 2 +- .../Interfaces/IHasArtwork.cs | 2 +- .../Interfaces/IHasCompanies.cs | 2 +- .../Interfaces/IHasPermissions.cs | 2 +- .../Interfaces/IHasReleases.cs | 2 +- .../Jellyfin.Database.Implementations/JellyfinDbContext.cs | 4 ++-- .../ModelConfiguration/ActivityLogConfiguration.cs | 2 +- .../ModelConfiguration/AncestorIdConfiguration.cs | 2 +- .../ModelConfiguration/ApiKeyConfiguration.cs | 2 +- .../AttachmentStreamInfoConfiguration.cs | 2 +- .../ModelConfiguration/BaseItemConfiguration.cs | 2 +- .../BaseItemMetadataFieldConfiguration.cs | 2 +- .../ModelConfiguration/BaseItemProviderConfiguration.cs | 2 +- .../ModelConfiguration/BaseItemTrailerTypeConfiguration.cs | 2 +- .../ModelConfiguration/ChapterConfiguration.cs | 2 +- .../CustomItemDisplayPreferencesConfiguration.cs | 2 +- .../ModelConfiguration/DeviceConfiguration.cs | 2 +- .../ModelConfiguration/DeviceOptionsConfiguration.cs | 2 +- .../ModelConfiguration/DisplayPreferencesConfiguration.cs | 2 +- .../ModelConfiguration/ItemValuesConfiguration.cs | 2 +- .../ModelConfiguration/ItemValuesMapConfiguration.cs | 2 +- .../ModelConfiguration/MediaStreamInfoConfiguration.cs | 2 +- .../ModelConfiguration/PeopleBaseItemMapConfiguration.cs | 2 +- .../ModelConfiguration/PeopleConfiguration.cs | 2 +- .../ModelConfiguration/PermissionConfiguration.cs | 2 +- .../ModelConfiguration/PreferenceConfiguration.cs | 2 +- .../ModelConfiguration/TrickplayInfoConfiguration.cs | 2 +- .../ModelConfiguration/UserConfiguration.cs | 2 +- .../ModelConfiguration/UserDataConfiguration.cs | 2 +- .../Jellyfin.Database.Providers.Sqlite.csproj | 7 ------- .../Migrations/SqliteDesignTimeJellyfinDbFactory.cs | 3 +-- .../ModelBuilderExtensions.cs | 2 +- .../ValueConverters/DateTimeKindValueConverter.cs | 2 +- src/Jellyfin.Drawing/ImageProcessor.cs | 2 +- src/Jellyfin.LiveTv/Channels/ChannelManager.cs | 2 +- src/Jellyfin.LiveTv/LiveTvManager.cs | 2 +- .../Auth/CustomAuthenticationHandlerTests.cs | 2 +- .../DefaultAuthorizationHandlerTests.cs | 2 +- .../FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs | 2 +- .../IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs | 2 +- .../Jellyfin.Api.Tests/Controllers/UserControllerTests.cs | 2 +- tests/Jellyfin.Api.Tests/TestHelpers.cs | 4 ++-- .../EfMigrations/EfMigrationTests.cs | 1 + .../SessionManager/SessionManagerTests.cs | 2 +- .../Parsers/MovieNfoParserTests.cs | 2 +- 240 files changed, 252 insertions(+), 255 deletions(-) diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 4a0662e16a..60f515f24d 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Collections; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 356d1e437a..0ce967e6a9 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -5,8 +5,8 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Common; using MediaBrowser.Controller.Channels; diff --git a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs index fb0a55135f..933cfc8cbe 100644 --- a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs @@ -5,8 +5,8 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Configuration; diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 846663900b..27f6826685 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -19,8 +19,8 @@ using Emby.Server.Implementations.Playlists; using Emby.Server.Implementations.ScheduledTasks.Tasks; using Emby.Server.Implementations.Sorting; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index 8631958365..afe5b14e92 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -14,8 +14,8 @@ using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; diff --git a/Emby.Server.Implementations/Library/MusicManager.cs b/Emby.Server.Implementations/Library/MusicManager.cs index ffbf8068f0..28cf695007 100644 --- a/Emby.Server.Implementations/Library/MusicManager.cs +++ b/Emby.Server.Implementations/Library/MusicManager.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Library/SearchEngine.cs b/Emby.Server.Implementations/Library/SearchEngine.cs index 9253a9a69f..9d81b835ce 100644 --- a/Emby.Server.Implementations/Library/SearchEngine.cs +++ b/Emby.Server.Implementations/Library/SearchEngine.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; using System.Linq; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 2a28131519..8b88b904bb 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -6,8 +6,8 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 22baafbb07..5a9315a92a 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -7,8 +7,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Channels; diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index 9e780a49e5..7b0a164414 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -9,8 +9,8 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Playlists/PlaylistsFolder.cs b/Emby.Server.Implementations/Playlists/PlaylistsFolder.cs index db3aeaaf31..a5be2b616e 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistsFolder.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistsFolder.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Playlists; diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 959373fec8..42f7deca15 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -8,11 +8,11 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; -using Jellyfin.Data.Entities.Security; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations.Entities; +using Jellyfin.Database.Implementations.Entities.Security; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Events; diff --git a/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs b/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs index e1c26d0121..9afc511086 100644 --- a/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs @@ -2,8 +2,8 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs index d668c17bfc..4c013a8bd7 100644 --- a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs @@ -1,8 +1,8 @@ #nullable disable using System; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs index 622a341b6a..cf77861673 100644 --- a/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs @@ -1,8 +1,8 @@ #nullable disable #pragma warning disable CS1591 -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs index 2a3e456c2d..e42c8a33a3 100644 --- a/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs @@ -2,8 +2,8 @@ #pragma warning disable CS1591 -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs index afd8ccf9f3..f54188030b 100644 --- a/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs @@ -2,8 +2,8 @@ #pragma warning disable CS1591 -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs index 12f88bf4da..dd2149b578 100644 --- a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs @@ -1,7 +1,7 @@ #nullable disable -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/SyncPlay/Group.cs b/Emby.Server.Implementations/SyncPlay/Group.cs index a7821c0e0e..d47e477938 100644 --- a/Emby.Server.Implementations/SyncPlay/Group.cs +++ b/Emby.Server.Implementations/SyncPlay/Group.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Session; diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index 74db077d8c..ee2e18f735 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Configuration; diff --git a/Jellyfin.Api/Controllers/ArtistsController.cs b/Jellyfin.Api/Controllers/ArtistsController.cs index 2da4839138..7ba75dc243 100644 --- a/Jellyfin.Api/Controllers/ArtistsController.cs +++ b/Jellyfin.Api/Controllers/ArtistsController.cs @@ -4,8 +4,8 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs index 2196616dd9..13064882cc 100644 --- a/Jellyfin.Api/Controllers/DisplayPreferencesController.cs +++ b/Jellyfin.Api/Controllers/DisplayPreferencesController.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using Jellyfin.Api.Helpers; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; diff --git a/Jellyfin.Api/Controllers/GenresController.cs b/Jellyfin.Api/Controllers/GenresController.cs index 1fd57eba9c..dd60d01e0c 100644 --- a/Jellyfin.Api/Controllers/GenresController.cs +++ b/Jellyfin.Api/Controllers/GenresController.cs @@ -4,8 +4,8 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs index b711990261..e7b7405ca9 100644 --- a/Jellyfin.Api/Controllers/ImageController.cs +++ b/Jellyfin.Api/Controllers/ImageController.cs @@ -130,7 +130,7 @@ public class ImageController : BaseJellyfinApiController await _userManager.ClearProfileImageAsync(user).ConfigureAwait(false); } - user.ProfileImage = new Data.Entities.ImageInfo(Path.Combine(userDataPath, "profile" + extension)); + user.ProfileImage = new Database.Implementations.Entities.ImageInfo(Path.Combine(userDataPath, "profile" + extension)); await _providerManager .SaveImage(stream, mimeType, user.ProfileImage.Path) diff --git a/Jellyfin.Api/Controllers/InstantMixController.cs b/Jellyfin.Api/Controllers/InstantMixController.cs index e326b925b8..c4b9767565 100644 --- a/Jellyfin.Api/Controllers/InstantMixController.cs +++ b/Jellyfin.Api/Controllers/InstantMixController.cs @@ -6,7 +6,7 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs index ff4540f58f..bde1758e99 100644 --- a/Jellyfin.Api/Controllers/LibraryController.cs +++ b/Jellyfin.Api/Controllers/LibraryController.cs @@ -11,8 +11,8 @@ using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; using Jellyfin.Api.Models.LibraryDtos; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Api; diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.cs index 09a7b73b94..363acf815a 100644 --- a/Jellyfin.Api/Controllers/MoviesController.cs +++ b/Jellyfin.Api/Controllers/MoviesController.cs @@ -5,8 +5,8 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Controllers/MusicGenresController.cs b/Jellyfin.Api/Controllers/MusicGenresController.cs index 0cb20e433d..1e45e53ca1 100644 --- a/Jellyfin.Api/Controllers/MusicGenresController.cs +++ b/Jellyfin.Api/Controllers/MusicGenresController.cs @@ -4,8 +4,8 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Controllers/PersonsController.cs b/Jellyfin.Api/Controllers/PersonsController.cs index b0c493fbec..4d12dc18fc 100644 --- a/Jellyfin.Api/Controllers/PersonsController.cs +++ b/Jellyfin.Api/Controllers/PersonsController.cs @@ -4,7 +4,7 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/PlaystateController.cs b/Jellyfin.Api/Controllers/PlaystateController.cs index 794c6500c6..1577b45947 100644 --- a/Jellyfin.Api/Controllers/PlaystateController.cs +++ b/Jellyfin.Api/Controllers/PlaystateController.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; diff --git a/Jellyfin.Api/Controllers/StudiosController.cs b/Jellyfin.Api/Controllers/StudiosController.cs index 43c5384dce..52cb87e72c 100644 --- a/Jellyfin.Api/Controllers/StudiosController.cs +++ b/Jellyfin.Api/Controllers/StudiosController.cs @@ -3,8 +3,8 @@ using System.ComponentModel.DataAnnotations; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/SuggestionsController.cs b/Jellyfin.Api/Controllers/SuggestionsController.cs index 5075d91be7..52982c362d 100644 --- a/Jellyfin.Api/Controllers/SuggestionsController.cs +++ b/Jellyfin.Api/Controllers/SuggestionsController.cs @@ -3,8 +3,8 @@ using System.ComponentModel.DataAnnotations; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Controllers/UserLibraryController.cs b/Jellyfin.Api/Controllers/UserLibraryController.cs index 6cc2b4244c..0e04beb14e 100644 --- a/Jellyfin.Api/Controllers/UserLibraryController.cs +++ b/Jellyfin.Api/Controllers/UserLibraryController.cs @@ -7,8 +7,8 @@ using System.Threading.Tasks; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/Jellyfin.Api/Controllers/YearsController.cs b/Jellyfin.Api/Controllers/YearsController.cs index bbfa270db9..ebf98da456 100644 --- a/Jellyfin.Api/Controllers/YearsController.cs +++ b/Jellyfin.Api/Controllers/YearsController.cs @@ -6,8 +6,8 @@ using System.Linq; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Dto; diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs index 6487160303..ebd0288ca6 100644 --- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs +++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs @@ -8,8 +8,8 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Extensions; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Helpers/MediaInfoHelper.cs b/Jellyfin.Api/Helpers/MediaInfoHelper.cs index 1801b6bfd4..7b493d3fa0 100644 --- a/Jellyfin.Api/Helpers/MediaInfoHelper.cs +++ b/Jellyfin.Api/Helpers/MediaInfoHelper.cs @@ -8,8 +8,8 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Extensions; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index 3c2691cb5e..e10e940f21 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -5,8 +5,8 @@ using System.Security.Claims; using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Data/Events/Users/UserCreatedEventArgs.cs b/Jellyfin.Data/Events/Users/UserCreatedEventArgs.cs index b3b8d28318..8de34fec2c 100644 --- a/Jellyfin.Data/Events/Users/UserCreatedEventArgs.cs +++ b/Jellyfin.Data/Events/Users/UserCreatedEventArgs.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Data.Events.Users { diff --git a/Jellyfin.Data/Events/Users/UserDeletedEventArgs.cs b/Jellyfin.Data/Events/Users/UserDeletedEventArgs.cs index d57c917c9f..c85de34ded 100644 --- a/Jellyfin.Data/Events/Users/UserDeletedEventArgs.cs +++ b/Jellyfin.Data/Events/Users/UserDeletedEventArgs.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Data.Events.Users { diff --git a/Jellyfin.Data/Events/Users/UserLockedOutEventArgs.cs b/Jellyfin.Data/Events/Users/UserLockedOutEventArgs.cs index 4475948219..46b399d26d 100644 --- a/Jellyfin.Data/Events/Users/UserLockedOutEventArgs.cs +++ b/Jellyfin.Data/Events/Users/UserLockedOutEventArgs.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Data.Events.Users { diff --git a/Jellyfin.Data/Events/Users/UserPasswordChangedEventArgs.cs b/Jellyfin.Data/Events/Users/UserPasswordChangedEventArgs.cs index a235ccada9..ee41147d5d 100644 --- a/Jellyfin.Data/Events/Users/UserPasswordChangedEventArgs.cs +++ b/Jellyfin.Data/Events/Users/UserPasswordChangedEventArgs.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Data.Events.Users { diff --git a/Jellyfin.Data/Events/Users/UserUpdatedEventArgs.cs b/Jellyfin.Data/Events/Users/UserUpdatedEventArgs.cs index 780ace6abe..0f2763f366 100644 --- a/Jellyfin.Data/Events/Users/UserUpdatedEventArgs.cs +++ b/Jellyfin.Data/Events/Users/UserUpdatedEventArgs.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Data.Events.Users { diff --git a/Jellyfin.Data/UserEntityExtensions.cs b/Jellyfin.Data/UserEntityExtensions.cs index 8bf82265c9..149fc9042d 100644 --- a/Jellyfin.Data/UserEntityExtensions.cs +++ b/Jellyfin.Data/UserEntityExtensions.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; using System.Linq; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs index 007a468bf2..8d492f7cd7 100644 --- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs +++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs @@ -1,10 +1,10 @@ using System; using System.Linq; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Querying; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index e414a8232f..51a1186452 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -5,11 +5,11 @@ using System.Linq; using System.Threading.Tasks; using Jellyfin.Data; using Jellyfin.Data.Dtos; -using Jellyfin.Data.Entities; -using Jellyfin.Data.Entities.Security; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; +using Jellyfin.Database.Implementations.Entities.Security; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Library/LyricDownloadFailureLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Library/LyricDownloadFailureLogger.cs index 0d52bb9856..5f4864e953 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Library/LyricDownloadFailureLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Library/LyricDownloadFailureLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Events; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Library/SubtitleDownloadFailureLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Library/SubtitleDownloadFailureLogger.cs index 0a8c064a99..8fe380e4f4 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Library/SubtitleDownloadFailureLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Library/SubtitleDownloadFailureLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Events; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationFailedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationFailedLogger.cs index a4424c7391..1a8931a6dc 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationFailedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationFailedLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Authentication; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationSucceededLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationSucceededLogger.cs index e0ecef2a5d..584d559e44 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationSucceededLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Security/AuthenticationSucceededLogger.cs @@ -1,6 +1,6 @@ using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Authentication; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs index 0ef929a99b..73323acb37 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStartLogger.cs @@ -1,8 +1,8 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs index 7d452ea2fd..b75567539c 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/PlaybackStopLogger.cs @@ -1,8 +1,8 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionEndedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionEndedLogger.cs index 77e7859c6f..b90708a2f2 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionEndedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionEndedLogger.cs @@ -1,6 +1,6 @@ using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Session; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionStartedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionStartedLogger.cs index 141dc20ea3..139c2e2acb 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionStartedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Session/SessionStartedLogger.cs @@ -1,6 +1,6 @@ using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Session; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/System/TaskCompletedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/System/TaskCompletedLogger.cs index b0a9393eb6..da82a3b30f 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/System/TaskCompletedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/System/TaskCompletedLogger.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Globalization; using System.Text; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Globalization; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstallationFailedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstallationFailedLogger.cs index 0ae9b7f66f..632f30c7ad 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstallationFailedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstallationFailedLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common.Updates; using MediaBrowser.Controller.Events; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstalledLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstalledLogger.cs index 287ba578ba..4b49b714cf 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstalledLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginInstalledLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Updates; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUninstalledLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUninstalledLogger.cs index 2de207b152..2d24de7fc6 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUninstalledLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUninstalledLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Updates; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUpdatedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUpdatedLogger.cs index 08d6bf9c25..e892d3dd9a 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUpdatedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Updates/PluginUpdatedLogger.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Controller.Events.Updates; using MediaBrowser.Model.Activity; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserCreatedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserCreatedLogger.cs index a09c344f61..4f063f6a1b 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserCreatedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserCreatedLogger.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events.Users; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Globalization; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserDeletedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserDeletedLogger.cs index 46da8044a1..ba4a072e84 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserDeletedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserDeletedLogger.cs @@ -1,8 +1,8 @@ using System; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events.Users; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Globalization; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserLockedOutLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserLockedOutLogger.cs index 1d0d016a74..bbc00567d1 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserLockedOutLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserLockedOutLogger.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events.Users; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Globalization; diff --git a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserPasswordChangedLogger.cs b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserPasswordChangedLogger.cs index 2b8f966a80..7219704ec6 100644 --- a/Jellyfin.Server.Implementations/Events/Consumers/Users/UserPasswordChangedLogger.cs +++ b/Jellyfin.Server.Implementations/Events/Consumers/Users/UserPasswordChangedLogger.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events.Users; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Events; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Globalization; diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index 1f04b28290..4f69022441 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -16,9 +16,9 @@ using System.Reflection; using System.Text; using System.Text.Json; using System.Threading; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; @@ -38,7 +38,7 @@ using MediaBrowser.Model.Querying; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using BaseItemDto = MediaBrowser.Controller.Entities.BaseItem; -using BaseItemEntity = Jellyfin.Data.Entities.BaseItemEntity; +using BaseItemEntity = Jellyfin.Database.Implementations.Entities.BaseItemEntity; namespace Jellyfin.Server.Implementations.Item; diff --git a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs index 48b94a5f3f..93e15735c9 100644 --- a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs +++ b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs @@ -2,8 +2,8 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Chapters; using MediaBrowser.Controller.Drawing; using MediaBrowser.Model.Dto; diff --git a/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs b/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs index 18167cc530..3ae6dbd702 100644 --- a/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs +++ b/Jellyfin.Server.Implementations/Item/MediaAttachmentRepository.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Threading; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Entities; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs index f700718841..36c3b9e565 100644 --- a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs +++ b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Threading; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Entities; diff --git a/Jellyfin.Server.Implementations/Item/PeopleRepository.cs b/Jellyfin.Server.Implementations/Item/PeopleRepository.cs index 01a0ade63c..51040cee73 100644 --- a/Jellyfin.Server.Implementations/Item/PeopleRepository.cs +++ b/Jellyfin.Server.Implementations/Item/PeopleRepository.cs @@ -2,9 +2,9 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; diff --git a/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs b/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs index fa507ad040..d6eeafacc3 100644 --- a/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs +++ b/Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs @@ -5,8 +5,8 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs index 534e80f4e7..cf0293463f 100644 --- a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs +++ b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Jellyfin.Data.Entities.Security; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities.Security; using MediaBrowser.Controller.Security; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index b55d2271a6..bf39f13a77 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -7,8 +7,8 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Drawing; diff --git a/Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs b/Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs index acada7aa46..35c43b176d 100644 --- a/Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs +++ b/Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs @@ -2,7 +2,7 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Authentication; using MediaBrowser.Model.Cryptography; using Microsoft.Extensions.Logging; diff --git a/Jellyfin.Server.Implementations/Users/DefaultPasswordResetProvider.cs b/Jellyfin.Server.Implementations/Users/DefaultPasswordResetProvider.cs index cefbd0624d..6296881a9e 100644 --- a/Jellyfin.Server.Implementations/Users/DefaultPasswordResetProvider.cs +++ b/Jellyfin.Server.Implementations/Users/DefaultPasswordResetProvider.cs @@ -4,7 +4,7 @@ using System.IO; using System.Security.Cryptography; using System.Text.Json; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Authentication; diff --git a/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs b/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs index 02a52e5f25..92e2bb4fa7 100644 --- a/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs +++ b/Jellyfin.Server.Implementations/Users/DeviceAccessHost.cs @@ -1,9 +1,9 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Library; diff --git a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs index 3f9491038d..0f21e11a35 100644 --- a/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs +++ b/Jellyfin.Server.Implementations/Users/DisplayPreferencesManager.cs @@ -5,8 +5,8 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs b/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs index c4e4c460a6..caf9d5bd9a 100644 --- a/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs +++ b/Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs @@ -1,5 +1,5 @@ using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Authentication; namespace Jellyfin.Server.Implementations.Users diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index 0105f8162d..3c39e5503b 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -8,11 +8,11 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; using Jellyfin.Data.Events.Users; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs index 933d85de01..e9fe9abceb 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateActivityLogDb.cs @@ -2,8 +2,8 @@ using System; using System.Collections.Generic; using System.IO; using Emby.Server.Implementations.Data; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller; using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs index a50990ac5d..feaf46c843 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateAuthenticationDb.cs @@ -2,8 +2,8 @@ using System; using System.Collections.Generic; using System.IO; using Emby.Server.Implementations.Data; -using Jellyfin.Data.Entities.Security; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities.Security; using MediaBrowser.Controller; using MediaBrowser.Controller.Library; using Microsoft.Data.Sqlite; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs index 4f6c5100d9..a8fa2e52a1 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateDisplayPreferencesDb.cs @@ -5,8 +5,8 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; using Emby.Server.Implementations.Data; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller; using MediaBrowser.Controller.Library; diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs index 490daae42b..08eea03086 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs @@ -11,8 +11,8 @@ using System.Linq; using System.Text; using System.Threading; using Emby.Server.Implementations.Data; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using Jellyfin.Server.Implementations.Item; using MediaBrowser.Controller; @@ -21,7 +21,8 @@ using MediaBrowser.Model.Entities; using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using Chapter = Jellyfin.Data.Entities.Chapter; +using BaseItemEntity = Jellyfin.Database.Implementations.Entities.BaseItemEntity; +using Chapter = Jellyfin.Database.Implementations.Entities.Chapter; namespace Jellyfin.Server.Migrations.Routines; @@ -125,7 +126,7 @@ public class MigrateLibraryDb : IMigrationRoutine dbContext.ItemValues.ExecuteDelete(); // EFCores local lookup sucks. We cannot use context.ItemValues.Local here because its just super slow. - var localItems = new Dictionary<(int Type, string CleanValue), (ItemValue ItemValue, List ItemIds)>(); + var localItems = new Dictionary<(int Type, string CleanValue), (Database.Implementations.Entities.ItemValue ItemValue, List ItemIds)>(); foreach (SqliteDataReader dto in connection.Query(itemValueQuery)) { diff --git a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs index bd5bf98e0f..c40560660d 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs @@ -2,8 +2,8 @@ using System; using System.IO; using Emby.Server.Implementations.Data; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Database.Implementations; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions.Json; using Jellyfin.Server.Implementations.Users; diff --git a/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs b/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs index 81b532fda8..976a667acd 100644 --- a/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs +++ b/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Users; namespace MediaBrowser.Controller.Authentication diff --git a/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs b/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs index 8c9d1baf88..592ce99556 100644 --- a/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs +++ b/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs @@ -4,7 +4,7 @@ using System; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Users; namespace MediaBrowser.Controller.Authentication diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs index f6cbf5a00c..199e22b3fa 100644 --- a/MediaBrowser.Controller/Channels/Channel.cs +++ b/MediaBrowser.Controller/Channels/Channel.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using Jellyfin.Data; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Controller/Collections/ICollectionManager.cs b/MediaBrowser.Controller/Collections/ICollectionManager.cs index 38a78a67b5..206b5ac426 100644 --- a/MediaBrowser.Controller/Collections/ICollectionManager.cs +++ b/MediaBrowser.Controller/Collections/ICollectionManager.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Movies; diff --git a/MediaBrowser.Controller/Devices/IDeviceManager.cs b/MediaBrowser.Controller/Devices/IDeviceManager.cs index fe7dc1cf94..ea38950d32 100644 --- a/MediaBrowser.Controller/Devices/IDeviceManager.cs +++ b/MediaBrowser.Controller/Devices/IDeviceManager.cs @@ -1,10 +1,10 @@ using System; using System.Threading.Tasks; using Jellyfin.Data.Dtos; -using Jellyfin.Data.Entities; -using Jellyfin.Data.Entities.Security; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations.Entities; +using Jellyfin.Database.Implementations.Entities.Security; using MediaBrowser.Model.Devices; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs index 702ce39a2a..4eeec99b0b 100644 --- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs +++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Controller/Dto/IDtoService.cs b/MediaBrowser.Controller/Dto/IDtoService.cs index 22453f0f76..f1d507fcbd 100644 --- a/MediaBrowser.Controller/Dto/IDtoService.cs +++ b/MediaBrowser.Controller/Dto/IDtoService.cs @@ -1,7 +1,7 @@ #pragma warning disable CA1002 using System.Collections.Generic; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index d6e6592429..d016d8f62b 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -9,8 +9,8 @@ using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Library; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 39dc909633..58841e5b78 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -9,8 +9,8 @@ using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 29481481c4..1dd289631d 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -13,8 +13,8 @@ using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Common.Extensions; diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index b7b5dac034..ca79e62454 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -11,8 +11,8 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions.Json; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index d3e9da6226..dd85a6ec0e 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -14,8 +14,8 @@ using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; using J2N.Collections.Generic.Extensions; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Channels; diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index 57a8a01131..5ce5fd4fa9 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs index 3e1d892748..203a16a668 100644 --- a/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalPeopleQuery.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace MediaBrowser.Controller.Entities { diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index a252b7a25f..d656fccb4f 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -8,8 +8,8 @@ using System.Collections.Immutable; using System.Linq; using System.Text.Json.Serialization; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index 9dbac1e920..1293528fba 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -7,8 +7,8 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text.Json.Serialization; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Common; using MediaBrowser.Controller.Dto; diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 470702f3e6..5dad158519 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -10,8 +10,8 @@ using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs index 7ae4a4a2cd..bc7e22d9a0 100644 --- a/MediaBrowser.Controller/Entities/UserRootFolder.cs +++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Library; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Controller/Entities/UserView.cs b/MediaBrowser.Controller/Entities/UserView.cs index f5ca3737c2..dfa31315cb 100644 --- a/MediaBrowser.Controller/Entities/UserView.cs +++ b/MediaBrowser.Controller/Entities/UserView.cs @@ -8,8 +8,8 @@ using System.Linq; using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Extensions; using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.TV; diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index 18845ab9f6..c2b4da32ac 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -7,8 +7,8 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using MediaBrowser.Controller.Library; diff --git a/MediaBrowser.Controller/IDisplayPreferencesManager.cs b/MediaBrowser.Controller/IDisplayPreferencesManager.cs index 10c0f56e09..a97096eaee 100644 --- a/MediaBrowser.Controller/IDisplayPreferencesManager.cs +++ b/MediaBrowser.Controller/IDisplayPreferencesManager.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace MediaBrowser.Controller { diff --git a/MediaBrowser.Controller/Library/IIntroProvider.cs b/MediaBrowser.Controller/Library/IIntroProvider.cs index 4a9721acbe..860e948afe 100644 --- a/MediaBrowser.Controller/Library/IIntroProvider.cs +++ b/MediaBrowser.Controller/Library/IIntroProvider.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; namespace MediaBrowser.Controller.Library @@ -23,6 +24,6 @@ namespace MediaBrowser.Controller.Library /// The item. /// The user. /// IEnumerable{System.String}. - Task> GetIntros(BaseItem item, Jellyfin.Data.Entities.User user); + Task> GetIntros(BaseItem item, User user); } } diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 13915dc5c6..a3e3e4991c 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.Controller/Library/IMediaSourceManager.cs b/MediaBrowser.Controller/Library/IMediaSourceManager.cs index eb697268c7..2b6781a197 100644 --- a/MediaBrowser.Controller/Library/IMediaSourceManager.cs +++ b/MediaBrowser.Controller/Library/IMediaSourceManager.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Persistence; diff --git a/MediaBrowser.Controller/Library/IMusicManager.cs b/MediaBrowser.Controller/Library/IMusicManager.cs index 7ba8fc20cf..20764ec601 100644 --- a/MediaBrowser.Controller/Library/IMusicManager.cs +++ b/MediaBrowser.Controller/Library/IMusicManager.cs @@ -1,7 +1,7 @@ #pragma warning disable CA1002, CS1591 using System.Collections.Generic; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; diff --git a/MediaBrowser.Controller/Library/IUserDataManager.cs b/MediaBrowser.Controller/Library/IUserDataManager.cs index 5a2deda66a..eb46611dd9 100644 --- a/MediaBrowser.Controller/Library/IUserDataManager.cs +++ b/MediaBrowser.Controller/Library/IUserDataManager.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Threading; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index 1c115be857..0109cf4b7d 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Users; diff --git a/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs b/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs index 76e9eb1f54..b0a6782c77 100644 --- a/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs +++ b/MediaBrowser.Controller/Library/PlaybackProgressEventArgs.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Session; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index c0e46ba245..8d59eef9f1 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -6,8 +6,8 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index caa312987d..7586ac9024 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -6,8 +6,8 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs b/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs index 1e75446e1c..456977b88e 100644 --- a/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs +++ b/MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.MediaSegments; diff --git a/MediaBrowser.Controller/Net/AuthorizationInfo.cs b/MediaBrowser.Controller/Net/AuthorizationInfo.cs index e452f26494..dd5eb9a01d 100644 --- a/MediaBrowser.Controller/Net/AuthorizationInfo.cs +++ b/MediaBrowser.Controller/Net/AuthorizationInfo.cs @@ -1,6 +1,6 @@ using System; using System.Diagnostics.CodeAnalysis; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace MediaBrowser.Controller.Net { diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index 53e04066f0..1062399e3f 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -10,8 +10,8 @@ using System.Text.Json.Serialization; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index 5dd0413b4d..21131e6b5e 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -6,7 +6,8 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities.Security; +using Jellyfin.Database.Implementations.Entities; +using Jellyfin.Database.Implementations.Entities.Security; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Dto; @@ -73,7 +74,7 @@ namespace MediaBrowser.Controller.Session /// The remote end point. /// The user. /// A task containing the session information. - Task LogSessionActivity(string appName, string appVersion, string deviceId, string deviceName, string remoteEndPoint, Jellyfin.Data.Entities.User user); + Task LogSessionActivity(string appName, string appVersion, string deviceId, string deviceName, string remoteEndPoint, User user); /// /// Used to report that a session controller has connected. diff --git a/MediaBrowser.Controller/Sorting/IUserBaseItemComparer.cs b/MediaBrowser.Controller/Sorting/IUserBaseItemComparer.cs index 66a0c52547..97f653edf5 100644 --- a/MediaBrowser.Controller/Sorting/IUserBaseItemComparer.cs +++ b/MediaBrowser.Controller/Sorting/IUserBaseItemComparer.cs @@ -1,5 +1,6 @@ #nullable disable +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Library; namespace MediaBrowser.Controller.Sorting @@ -13,7 +14,7 @@ namespace MediaBrowser.Controller.Sorting /// Gets or sets the user. /// /// The user. - Jellyfin.Data.Entities.User User { get; set; } + User User { get; set; } /// /// Gets or sets the user manager. diff --git a/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs b/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs index 800317800d..9ac8ead11c 100644 --- a/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs +++ b/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; diff --git a/MediaBrowser.Model/Activity/IActivityManager.cs b/MediaBrowser.Model/Activity/IActivityManager.cs index 28073fb8d7..95aa567ada 100644 --- a/MediaBrowser.Model/Activity/IActivityManager.cs +++ b/MediaBrowser.Model/Activity/IActivityManager.cs @@ -2,9 +2,9 @@ using System; using System.Threading.Tasks; -using Jellyfin.Data.Entities; using Jellyfin.Data.Events; using Jellyfin.Data.Queries; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Querying; namespace MediaBrowser.Model.Activity diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 7e8949e1fb..7bfd8ca29c 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Library; diff --git a/MediaBrowser.Model/Library/UserViewQuery.cs b/MediaBrowser.Model/Library/UserViewQuery.cs index 643a1f9b13..01d5e3b6ca 100644 --- a/MediaBrowser.Model/Library/UserViewQuery.cs +++ b/MediaBrowser.Model/Library/UserViewQuery.cs @@ -1,8 +1,8 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; namespace MediaBrowser.Model.Library { diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs index 251ff5d681..40dc813978 100644 --- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs +++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs @@ -2,8 +2,8 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index aee720aa7b..a2a3a9d1bb 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -1,7 +1,7 @@ #pragma warning disable CS1591 using System; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index ba0eaf21cf..3d430e1015 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -7,7 +7,7 @@ using System.ComponentModel.DataAnnotations; using System.Xml.Serialization; using Jellyfin.Data.Enums; using Jellyfin.Database.Implementations.Enums; -using AccessSchedule = Jellyfin.Data.Entities.AccessSchedule; +using AccessSchedule = Jellyfin.Database.Implementations.Entities.AccessSchedule; namespace MediaBrowser.Model.Users { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs index 909e8750f8..e23ac86aaa 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AccessSchedule.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Xml.Serialization; using Jellyfin.Database.Implementations.Enums; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing a user's access schedule. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs index 3a76784052..bf623be7ed 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ActivityLog.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; using Microsoft.Extensions.Logging; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity referencing an activity log entry. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs index 954416dfe1..3d25ae4f45 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AncestorId.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Represents the relational information for an . diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs index 19265a0115..aab3082b37 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/AttachmentStreamInfo.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Provides information about an Attachment to an . diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs index 42be5b3b99..fc9695a091 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; public class BaseItemEntity { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs index 54aef50e40..46a59f7903 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemExtraType.cs @@ -1,5 +1,5 @@ #pragma warning disable CS1591 -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; public enum BaseItemExtraType { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs index ac6b72acea..71d60fc25d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemImageInfo.cs @@ -2,7 +2,7 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Enum TrailerTypes. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs index 27bbfc4731..e7dbc8e9fd 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemMetadataField.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Enum MetadataFields. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs index c0c5e3147f..73bb583e31 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemProvider.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Represents a Key-Value relation of an BaseItem's provider. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs index 2bb648138a..db329ad2af 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemTrailerType.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Enum TrailerTypes. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs index 579442cdb6..f9b9813281 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Chapter.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// The Chapter entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs index a606595122..b3d4b16bc6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/CustomItemDisplayPreferences.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity that represents a user's custom display preferences for a specific item. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs index 82bf007a8a..ae6966e594 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/DisplayPreferences.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing a user's display preferences. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs index 4b343c164a..9dd2486464 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Group.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing a group. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs index edffec4aba..584550ac56 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/HomeSection.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing a section on the user's home page. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs index 935a53a263..9c0b36852e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfo.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing an image. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs index f78178dd22..6052a95bb2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ImageInfoImageType.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Enum ImageType. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs index 7e75a200b6..6770531143 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemDisplayPreferences.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity that represents a user's display preferences for a specific item. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs index 11d8e383ee..b5a31921d8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValue.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Represents an ItemValue for a BaseItem. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs index e80a9aec34..23f6e0f7bc 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueMap.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Mapping table for the ItemValue BaseItem relation. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs index 3bae3beccd..9e2e11c006 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ItemValueType.cs @@ -1,5 +1,5 @@ #pragma warning disable CA1027 // Mark enums with FlagsAttribute -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Provides the Value types for an . diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs index b529da8fa7..f3083a96ba 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Artwork.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing artwork. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs index 54c30d92ce..b56c1f9403 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Book.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a book. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs index 7b1a68bb55..a284d563a3 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/BookMetadata.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity containing metadata for a book. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs index cbcb9a5f54..eac973060e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Chapter.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a chapter. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs index 8da9793f9d..03b68317a6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Collection.cs @@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a collection. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs index 4bd99d83a7..3777c705b8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CollectionItem.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a collection item. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs index 5dc1039a1f..c686751ab7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Company.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a company. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs index a29f08c7f6..fdf1f274fb 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CompanyMetadata.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity holding metadata for a . diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs index 92307afecd..70e47d6bc6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItem.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a custom item. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs index af2393870f..660e535e3a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/CustomItemMetadata.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity containing metadata for a custom item. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs index 6379755264..7cb71f06d9 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Episode.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing an episode. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs index b0ef11e0f2..b5c2c3c2a3 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/EpisodeMetadata.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity containing metadata for an . diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs index 329b8973f5..442dced2f4 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Genre.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a genre. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs index 401d58ff22..e5cbab7e45 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/ItemMetadata.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An abstract class that holds metadata. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs index 17673cb1d9..d1877ef438 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Library.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a library. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs index 975614be10..4fccf6d731 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/LibraryItem.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a library item. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs index 0913f95be1..6e435579c7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFile.cs @@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a file on disk. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs index 3170653fec..4552386fee 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MediaFileStream.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a stream in a media file. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs index afaebb8e86..dc8f153500 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProvider.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a metadata provider. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs index fa36e58db7..b7c9313a26 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MetadataProviderId.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a unique identifier for a metadata provider. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs index beae325ec5..afc0e0f435 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Movie.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a movie. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs index df48ebf279..3d797d97e7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MovieMetadata.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity holding the metadata for a movie. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs index d6231bbf02..51f77ce0be 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbum.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a music album. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs index 691f3504fa..bfb94c44d6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/MusicAlbumMetadata.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity holding the metadata for a music album. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs index d9609f1cc0..25cdfdc2ee 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Person.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a person. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs index 627f74140b..e1c2113908 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PersonRole.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a person's role in media. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs index 094d57139c..b113170e1d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Photo.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a photo. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs index 6c284307d7..6fae4a024f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/PhotoMetadata.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity that holds metadata for a photo. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs index 6b792ffb48..627575024e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Rating.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a rating for an entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs index 91ee8caa16..8322855991 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/RatingSource.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// This is the entity to store review ratings, not age ratings. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs index 40466def1d..db148338e2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Release.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a release for a library item, eg. Director's cut vs. standard. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs index fc110b49da..dc9f695d98 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Season.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a season. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs index da40a075f5..af1e9fa2b7 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeasonMetadata.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity that holds metadata for seasons. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs index ab484c96d6..1e1633248f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Series.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a series. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs index 28da91e472..b1b2b10bea 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/SeriesMetadata.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing series metadata. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs index 6d6a920225..f0bd88963a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/Track.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity representing a track. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs index 042d2b90db..d9b4736a7c 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Libraries/TrackMetadata.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Data.Entities.Libraries +namespace Jellyfin.Database.Implementations.Entities.Libraries { /// /// An entity holding metadata for a track. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs index 8c1c071e63..c34369d889 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaSegment.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// An entity representing the metadata for a group of trickplay tiles. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs index b16b62b104..207317376d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamInfo.cs @@ -2,7 +2,7 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; public class MediaStreamInfo { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs index f57672a2cf..33dd81bdd6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/MediaStreamTypeEntity.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Enum MediaStreamType. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs index 18c778b17a..20cf3e2d9e 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/People.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// People entity. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs index bfaaf82151..c719a185c4 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/PeopleBaseItemMap.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Mapping table for People to BaseItems. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs index c488b90e1c..84b86574cc 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Permission.cs @@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing whether the associated user has a specific permission. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs index f4f9dd17ac..c02ea7375a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Preference.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing a preference attached to a user or group. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs index 9d79e5ddb1..cb7255c19f 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/ProgramAudioEntity.cs @@ -1,4 +1,4 @@ -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Lists types of Audio. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs index 1fcbe0f5e9..25a1d5ce90 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/ApiKey.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Globalization; -namespace Jellyfin.Data.Entities.Security +namespace Jellyfin.Database.Implementations.Entities.Security { /// /// An entity representing an API key. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs index 67d7f78eda..b0f9b2d569 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/Device.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Globalization; -namespace Jellyfin.Data.Entities.Security +namespace Jellyfin.Database.Implementations.Entities.Security { /// /// An entity representing a device. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs index 531f66c627..8ac3e364c4 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/Security/DeviceOptions.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations.Schema; -namespace Jellyfin.Data.Entities.Security +namespace Jellyfin.Database.Implementations.Entities.Security { /// /// An entity representing custom options for a device. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs index ff9a68beff..06b290e4f2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/TrickplayInfo.cs @@ -1,7 +1,7 @@ using System; using System.Text.Json.Serialization; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// An entity representing the metadata for a group of trickplay tiles. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs index aafa92b4a6..31538b5bf3 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/User.cs @@ -6,7 +6,7 @@ using System.Text.Json.Serialization; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Database.Implementations.Interfaces; -namespace Jellyfin.Data.Entities +namespace Jellyfin.Database.Implementations.Entities { /// /// An entity representing a user. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs index ced12b9e62..cd80686615 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs @@ -1,6 +1,6 @@ using System; -namespace Jellyfin.Data.Entities; +namespace Jellyfin.Database.Implementations.Entities; /// /// Provides and related data. diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs index fed092b978..a6e8732fff 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Enums/MediaSegmentType.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Database.Implementations.Enums; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs index 03c2ca4a47..46007472a2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasArtwork.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Entities.Libraries; +using Jellyfin.Database.Implementations.Entities.Libraries; namespace Jellyfin.Database.Implementations.Interfaces { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs index ed449a8f14..5cfefa456a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasCompanies.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Entities.Libraries; +using Jellyfin.Database.Implementations.Entities.Libraries; namespace Jellyfin.Database.Implementations.Interfaces { diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs index 606b1169b8..99b29e6d35 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasPermissions.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; namespace Jellyfin.Database.Implementations.Interfaces; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs index 653572b6e9..742a6a3867 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/Interfaces/IHasReleases.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Jellyfin.Data.Entities.Libraries; +using Jellyfin.Database.Implementations.Entities.Libraries; namespace Jellyfin.Database.Implementations.Interfaces; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs index 5cdc853319..9db70263d2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs @@ -1,7 +1,7 @@ using System; using System.Linq; -using Jellyfin.Data.Entities; -using Jellyfin.Data.Entities.Security; +using Jellyfin.Database.Implementations.Entities; +using Jellyfin.Database.Implementations.Entities.Security; using Jellyfin.Database.Implementations.Interfaces; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs index be99b46d56..a209c5b90d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ActivityLogConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs index 146df5546c..1cb4a1eb1d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AncestorIdConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs index 7c15f064d8..ea382c7183 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ApiKeyConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities.Security; +using Jellyfin.Database.Implementations.Entities.Security; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs index b5fae4053c..66cafc83cf 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/AttachmentStreamInfoConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs index 67a071039f..37816faece 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs index c101e0085e..a602ea65f4 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemMetadataFieldConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs index 175a82e091..dd28000ba6 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs index c7efef2390..2a888b7de8 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemTrailerTypeConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs index 5935b632a7..d97a39f4d2 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs index 550fa5073b..e8a510ab97 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/CustomItemDisplayPreferencesConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs index 5f87c8d403..3551f76863 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities.Security; +using Jellyfin.Database.Implementations.Entities.Security; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs index 923a53acaf..9055e80253 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities.Security; +using Jellyfin.Database.Implementations.Entities.Security; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs index 92068c8f29..45e0c64824 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/DisplayPreferencesConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs index 0e63c130e3..c8e003eaa1 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs index 3860b0e161..42ef235326 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs index 37e15f5e72..075af2c053 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs index 125b9e92cd..5e3ab44433 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs index fe25d3064d..e8f77a8067 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PeopleConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs index 90a3ec5d00..d2aed54eb1 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PermissionConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs index d6d3fadfc4..207051bcd1 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/PreferenceConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs index a198c80f7e..1b364a05ed 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/TrickplayInfoConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs index 4e830801ee..61b5e06e8a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs index a7e223c435..47604d3217 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/UserDataConfiguration.cs @@ -1,4 +1,4 @@ -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj index 4e5f63f6fe..ac62ea59a1 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj @@ -23,13 +23,6 @@ - - - - - - - diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs index 1629c732c6..78815c3118 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs @@ -1,10 +1,9 @@ using Jellyfin.Database.Implementations; -using Jellyfin.Database.Providers.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Logging.Abstractions; -namespace Jellyfin.Server.Implementations.Migrations +namespace Jellyfin.Database.Providers.Sqlite.Migrations { /// /// The design time factory for . diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs index 0d75686198..41375874d9 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelBuilderExtensions.cs @@ -1,5 +1,5 @@ using System; -using Jellyfin.Server.Implementations.ValueConverters; +using Jellyfin.Database.Providers.Sqlite.ValueConverters; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ValueConverters/DateTimeKindValueConverter.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ValueConverters/DateTimeKindValueConverter.cs index 2e585c92df..d4a9407b0d 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ValueConverters/DateTimeKindValueConverter.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ValueConverters/DateTimeKindValueConverter.cs @@ -1,7 +1,7 @@ using System; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace Jellyfin.Server.Implementations.ValueConverters +namespace Jellyfin.Database.Providers.Sqlite.ValueConverters { /// /// ValueConverter to specify kind. diff --git a/src/Jellyfin.Drawing/ImageProcessor.cs b/src/Jellyfin.Drawing/ImageProcessor.cs index fcb315b3a9..7718f6c6a5 100644 --- a/src/Jellyfin.Drawing/ImageProcessor.cs +++ b/src/Jellyfin.Drawing/ImageProcessor.cs @@ -9,7 +9,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; diff --git a/src/Jellyfin.LiveTv/Channels/ChannelManager.cs b/src/Jellyfin.LiveTv/Channels/ChannelManager.cs index 402a3f3b0e..0ca294a289 100644 --- a/src/Jellyfin.LiveTv/Channels/ChannelManager.cs +++ b/src/Jellyfin.LiveTv/Channels/ChannelManager.cs @@ -9,8 +9,8 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using AsyncKeyedLock; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Extensions; using Jellyfin.Extensions.Json; diff --git a/src/Jellyfin.LiveTv/LiveTvManager.cs b/src/Jellyfin.LiveTv/LiveTvManager.cs index 7ebcc48834..40adb51a58 100644 --- a/src/Jellyfin.LiveTv/LiveTvManager.cs +++ b/src/Jellyfin.LiveTv/LiveTvManager.cs @@ -9,9 +9,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using Jellyfin.Data.Events; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.LiveTv.Configuration; using MediaBrowser.Common.Extensions; diff --git a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs index 0a6489d0ac..7e44b062cf 100644 --- a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs @@ -7,7 +7,7 @@ using AutoFixture.AutoMoq; using Jellyfin.Api.Auth; using Jellyfin.Api.Constants; using Jellyfin.Data; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Controller.Authentication; using MediaBrowser.Controller.Net; diff --git a/tests/Jellyfin.Api.Tests/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandlerTests.cs index 162a022f5b..bfc7016d2a 100644 --- a/tests/Jellyfin.Api.Tests/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/DefaultAuthorizationPolicy/DefaultAuthorizationHandlerTests.cs @@ -7,7 +7,7 @@ using AutoFixture; using AutoFixture.AutoMoq; using Jellyfin.Api.Auth.DefaultAuthorizationPolicy; using Jellyfin.Api.Constants; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Server.Implementations.Security; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Library; diff --git a/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs index 1fe9fc97ef..fc243a8730 100644 --- a/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/FirstTimeSetupPolicy/FirstTimeSetupHandlerTests.cs @@ -7,7 +7,7 @@ using AutoFixture.AutoMoq; using Jellyfin.Api.Auth.DefaultAuthorizationPolicy; using Jellyfin.Api.Auth.FirstTimeSetupPolicy; using Jellyfin.Api.Constants; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Library; diff --git a/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs index ed5235252a..6e63c0450b 100644 --- a/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/IgnoreSchedulePolicy/IgnoreScheduleHandlerTests.cs @@ -5,7 +5,7 @@ using AutoFixture; using AutoFixture.AutoMoq; using Jellyfin.Api.Auth.DefaultAuthorizationPolicy; using Jellyfin.Api.Constants; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Library; diff --git a/tests/Jellyfin.Api.Tests/Controllers/UserControllerTests.cs b/tests/Jellyfin.Api.Tests/Controllers/UserControllerTests.cs index c7331c7181..a74dab5f29 100644 --- a/tests/Jellyfin.Api.Tests/Controllers/UserControllerTests.cs +++ b/tests/Jellyfin.Api.Tests/Controllers/UserControllerTests.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Threading.Tasks; using AutoFixture.Xunit2; using Jellyfin.Api.Controllers; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Devices; diff --git a/tests/Jellyfin.Api.Tests/TestHelpers.cs b/tests/Jellyfin.Api.Tests/TestHelpers.cs index 03884d7754..eff14e5f15 100644 --- a/tests/Jellyfin.Api.Tests/TestHelpers.cs +++ b/tests/Jellyfin.Api.Tests/TestHelpers.cs @@ -5,7 +5,7 @@ using System.Net; using System.Security.Claims; using Jellyfin.Api.Constants; using Jellyfin.Data; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.Enums; using Jellyfin.Server.Implementations.Users; using MediaBrowser.Common.Configuration; @@ -13,7 +13,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Configuration; using Microsoft.AspNetCore.Http; using Moq; -using AccessSchedule = Jellyfin.Data.Entities.AccessSchedule; +using AccessSchedule = Jellyfin.Database.Implementations.Entities.AccessSchedule; namespace Jellyfin.Api.Tests { diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs index 3fe2caca79..ba3abd5a22 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs @@ -1,3 +1,4 @@ +using Jellyfin.Database.Providers.Sqlite.Migrations; using Jellyfin.Server.Implementations.Migrations; using Microsoft.EntityFrameworkCore; using Xunit; diff --git a/tests/Jellyfin.Server.Implementations.Tests/SessionManager/SessionManagerTests.cs b/tests/Jellyfin.Server.Implementations.Tests/SessionManager/SessionManagerTests.cs index 9418edc5d6..a5a67046d1 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/SessionManager/SessionManagerTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/SessionManager/SessionManagerTests.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using Jellyfin.Data.Entities; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Devices; diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs index a71a08d8cd..e422eb9b8b 100644 --- a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs +++ b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs @@ -1,8 +1,8 @@ using System; using System.Linq; using System.Threading; -using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Movies; From bfff1b9be276ec33609b2bbf9f509f6a6bb08bd4 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Tue, 25 Mar 2025 16:55:26 +0100 Subject: [PATCH 33/34] Fix reference --- .../Jellyfin.Database.Providers.Sqlite.csproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj index ac62ea59a1..6899a35f63 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj @@ -27,4 +27,9 @@ + + + + + From 1b388d729682435b92cb10eba67a1170ecbfcc6c Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Tue, 25 Mar 2025 21:25:27 -0600 Subject: [PATCH 34/34] Clean up csproj --- .../Jellyfin.Database.Providers.Sqlite.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj index 6899a35f63..03e5fc4958 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj +++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Jellyfin.Database.Providers.Sqlite.csproj @@ -23,10 +23,6 @@ - - - -