mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #6049] EFCore Image model update and cleanup #10790
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/6049
Author: @ferferga
Created: 5/15/2021
Status: 🔄 Open
Base:
master← Head:efcore-update📝 Commits (10+)
985c06aRemove duplication moving ImageType to Jellyfin.Data5f7a9bbRemove duplicated DisplayPreferencesDto in MediaBrowser.Model in favor of Jellyfin.Apie8fb220Reference all ImageType to Jellyfin.Datab7659a2Remove all unused usings962d36eFinish Image entitya251d1dCreate EFCore migration2c4b51eMigrate users to the new image modelb87dbfbFix concurrency error3266a5eUse ImageType.Profile for user profilesd37d051Use EFCore migrations only to migrate to the new image model📊 Changes
132 files changed (+1173 additions, -459 deletions)
View changed files
📝
Emby.Dlna/Didl/DidlBuilder.cs(+1 -0)📝
Emby.Drawing/ImageProcessor.cs(+2 -1)📝
Emby.Photos/PhotoProvider.cs(+1 -0)📝
Emby.Server.Implementations/Channels/ChannelImageProvider.cs(+1 -1)📝
Emby.Server.Implementations/Collections/CollectionImageProvider.cs(+1 -1)📝
Emby.Server.Implementations/Data/SqliteItemRepository.cs(+0 -2)📝
Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs(+0 -1)📝
Emby.Server.Implementations/IO/ManagedFileSystem.cs(+0 -2)📝
Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs(+1 -1)📝
Emby.Server.Implementations/Images/DynamicImageProvider.cs(+1 -0)📝
Emby.Server.Implementations/Images/FolderImageProvider.cs(+0 -1)📝
Emby.Server.Implementations/Images/GenreImageProvider.cs(+0 -1)📝
Emby.Server.Implementations/Images/PlaylistImageProvider.cs(+1 -1)📝
Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs(+0 -1)📝
Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs(+1 -1)📝
Jellyfin.Api/Controllers/ApiKeyController.cs(+0 -1)📝
Jellyfin.Api/Controllers/ArtistsController.cs(+0 -1)📝
Jellyfin.Api/Controllers/DisplayPreferencesController.cs(+4 -4)📝
Jellyfin.Api/Controllers/DynamicHlsController.cs(+0 -1)📝
Jellyfin.Api/Controllers/ImageController.cs(+6 -5)...and 80 more files
📄 Description
Some of the entities defined in https://github.com/jellyfin/jellyfin/pull/2293 have changed, one of them being the images, which now include blurhashes.
Changes
Jellyfin.Data.EnumsfromMediaBrowser.Model.Entities, to remove the duplication that previously existed withArtworkKind.MigrateUserDbis not applied yet.New Image entity properties
With ImageType being the current ImageType enum
Current Image entity properties
Current ImageInfo properties
Every image we have in the client has (or can potentially have) all those fields in common. There's now a single 1:M or 1:1 relationship between any entity and
Image. Examples:In this PR, only used entities were changed to use the new
Imageentity, as the others haven't been migrated to EFCore yet and we have time to revisit the others as well.Issues
After running the migration,Microsoft.EntityFrameworkCore.DbUpdateConcurrencyExceptionexceptions are thrown after doing calls to the API controllers, not sure why (I callSaveChangesduring the migration). Stopping Jellyfin and starting it again fixes the problem and everything starts working correctly.Fixed on Use EFCore migrations only to migrate to the new image model commit.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.