[PR #6530] [CLOSED] Deduplicate code #10832

Closed
opened 2025-12-22 08:21:38 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/6530
Author: @ferferga
Created: 9/8/2021
Status: Closed

Base: masterHead: dedupe


📝 Commits (4)

  • c7362d6 Create new Image entity and deleted Artwork y ArtworkKind
  • f931382 Remove duplication moving ImageType to Jellyfin.Data
  • 1c8a7d2 Remove duplicated DisplayPreferencesDto in MediaBrowser.Model in favor of Jellyfin.Api
  • cc9c978 Reference all ImageType to Jellyfin.Data

📊 Changes

86 files changed (+200 additions, -278 deletions)

View changed files

📝 Emby.Dlna/Didl/DidlBuilder.cs (+1 -0)
📝 Emby.Drawing/ImageProcessor.cs (+1 -0)
📝 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/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/LiveTv/LiveTvDtoService.cs (+1 -1)
📝 Jellyfin.Api/Controllers/ArtistsController.cs (+0 -1)
📝 Jellyfin.Api/Controllers/DisplayPreferencesController.cs (+4 -4)
📝 Jellyfin.Api/Controllers/ImageController.cs (+1 -1)
📝 Jellyfin.Api/Controllers/InstantMixController.cs (+1 -1)
📝 Jellyfin.Api/Controllers/LibraryController.cs (+1 -0)
📝 Jellyfin.Api/Controllers/LiveTvController.cs (+0 -1)
📝 Jellyfin.Api/Controllers/MusicGenresController.cs (+0 -1)
📝 Jellyfin.Api/Controllers/PersonsController.cs (+1 -1)
📝 Jellyfin.Api/Controllers/PlaylistsController.cs (+1 -1)

...and 66 more files

📄 Description

Removed two duplicate enums, cherrypicked from #6049.

  • The ArtKind in the Jellyfin.Data namespace had the exact same fields as the ImageType enum in MediaBrowser.Model.Entities. As the new code will reside in Jellyfin.Data, it made sense to leave it in that namespace and rename it from ArtKind to ImageType. ImageType also seemed more correct to me, as the images we manage are not always artworks.

  • In Jellyfin.Api we had a DisplayPreferencesDto that was an exact copy from one in MediaBrowser.Model. As the Jellyfin.Api is the namespace for new code, it makes sense to keep that version instead of the one in MediaBrowser.

I also added the new "Image" entity I created in #6049 in this PR, as it didn't make any sense to me to keep an "Artwork" entity with an enum called "ImageType".


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/6530 **Author:** [@ferferga](https://github.com/ferferga) **Created:** 9/8/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dedupe` --- ### 📝 Commits (4) - [`c7362d6`](https://github.com/jellyfin/jellyfin/commit/c7362d6146485f1ccba9bd573b0f2996524d7ba4) Create new Image entity and deleted Artwork y ArtworkKind - [`f931382`](https://github.com/jellyfin/jellyfin/commit/f931382266cde2e9abef144e9ee88d52ec5c711d) Remove duplication moving ImageType to Jellyfin.Data - [`1c8a7d2`](https://github.com/jellyfin/jellyfin/commit/1c8a7d22c79a1e02d18ed73bf859e8a0421cd332) Remove duplicated DisplayPreferencesDto in MediaBrowser.Model in favor of Jellyfin.Api - [`cc9c978`](https://github.com/jellyfin/jellyfin/commit/cc9c9783f246fc10bed0f4f1d228def975c265d8) Reference all ImageType to Jellyfin.Data ### 📊 Changes **86 files changed** (+200 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Dlna/Didl/DidlBuilder.cs` (+1 -0) 📝 `Emby.Drawing/ImageProcessor.cs` (+1 -0) 📝 `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/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/LiveTv/LiveTvDtoService.cs` (+1 -1) 📝 `Jellyfin.Api/Controllers/ArtistsController.cs` (+0 -1) 📝 `Jellyfin.Api/Controllers/DisplayPreferencesController.cs` (+4 -4) 📝 `Jellyfin.Api/Controllers/ImageController.cs` (+1 -1) 📝 `Jellyfin.Api/Controllers/InstantMixController.cs` (+1 -1) 📝 `Jellyfin.Api/Controllers/LibraryController.cs` (+1 -0) 📝 `Jellyfin.Api/Controllers/LiveTvController.cs` (+0 -1) 📝 `Jellyfin.Api/Controllers/MusicGenresController.cs` (+0 -1) 📝 `Jellyfin.Api/Controllers/PersonsController.cs` (+1 -1) 📝 `Jellyfin.Api/Controllers/PlaylistsController.cs` (+1 -1) _...and 66 more files_ </details> ### 📄 Description Removed two duplicate enums, cherrypicked from #6049. * The ``ArtKind`` in the ``Jellyfin.Data`` namespace had the exact same fields as the ``ImageType`` enum in ``MediaBrowser.Model.Entities``. As the new code will reside in ``Jellyfin.Data``, it made sense to leave it in that namespace and rename it from ``ArtKind`` to ``ImageType``. ImageType also seemed more correct to me, as the images we manage are not always artworks. * In ``Jellyfin.Api`` we had a ``DisplayPreferencesDto`` that was an exact copy from one in ``MediaBrowser.Model``. As the ``Jellyfin.Api`` is the namespace for new code, it makes sense to keep that version instead of the one in MediaBrowser. I also added the new "Image" entity I created in #6049 in this PR, as it didn't make any sense to me to keep an "Artwork" entity with an enum called "ImageType". --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 08:21:38 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#10832
No description provided.