[PR #14568] [CLOSED] Refactor Type in BaseItem from String to integer with FK support #13854

Closed
opened 2025-12-22 10:06:24 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/14568
Author: @icegood
Created: 8/3/2025
Status: Closed

Base: masterHead: jellyfin_master


📝 Commits (1)

  • 0a20602 Refactor Type in BaseItem from String to integer with FK support

📊 Changes

24 files changed (+2683 additions, -247 deletions)

View changed files

📝 Emby.Server.Implementations/ApplicationHost.cs (+2 -2)
Emby.Server.Implementations/Data/ItemTypeLookup.cs (+0 -64)
📝 Jellyfin.Api/Controllers/FilterController.cs (+2 -2)
📝 Jellyfin.Data/Enums/BaseItemKind.cs (+1 -21)
Jellyfin.Server.Implementations/Item/BaseItemKindCache.cs (+57 -0)
📝 Jellyfin.Server.Implementations/Item/BaseItemRepository.cs (+63 -83)
📝 Jellyfin.Server.Implementations/Item/PeopleRepository.cs (+2 -4)
📝 Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs (+2 -2)
📝 Jellyfin.Server/Migrations/Routines/MigrateLibraryUserData.cs (+1 -1)
📝 Jellyfin.Server/Migrations/Routines/RefreshInternalDateModified.cs (+9 -8)
📝 MediaBrowser.Controller/Entities/BaseItem.cs (+1 -1)
📝 MediaBrowser.Controller/IServerApplicationHost.cs (+2 -0)
📝 MediaBrowser.Controller/LiveTv/LiveTvChannel.cs (+5 -0)
📝 MediaBrowser.Controller/LiveTv/LiveTvProgram.cs (+5 -0)
MediaBrowser.Controller/Persistence/IItemTypeLookup.cs (+0 -22)
📝 src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs (+1 -1)
src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemKindEntity.cs (+17 -0)
📝 src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs (+5 -0)
📝 src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs (+14 -14)
src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemKindConfiguration.cs (+55 -0)

...and 4 more files

📄 Description

  1. Replace internal mapping from types to classes from code to DB (less DB space and better search)
  2. Remove obsolete types (program, tvchannel) and map appropriate classes to other already existing classes.
  3. Remove some extra indexes (too much of them)

Issues


🔄 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/14568 **Author:** [@icegood](https://github.com/icegood) **Created:** 8/3/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `jellyfin_master` --- ### 📝 Commits (1) - [`0a20602`](https://github.com/jellyfin/jellyfin/commit/0a2060233c0f61c431c2f21dfd0884e94c566eb3) Refactor Type in BaseItem from String to integer with FK support ### 📊 Changes **24 files changed** (+2683 additions, -247 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/ApplicationHost.cs` (+2 -2) ➖ `Emby.Server.Implementations/Data/ItemTypeLookup.cs` (+0 -64) 📝 `Jellyfin.Api/Controllers/FilterController.cs` (+2 -2) 📝 `Jellyfin.Data/Enums/BaseItemKind.cs` (+1 -21) ➕ `Jellyfin.Server.Implementations/Item/BaseItemKindCache.cs` (+57 -0) 📝 `Jellyfin.Server.Implementations/Item/BaseItemRepository.cs` (+63 -83) 📝 `Jellyfin.Server.Implementations/Item/PeopleRepository.cs` (+2 -4) 📝 `Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs` (+2 -2) 📝 `Jellyfin.Server/Migrations/Routines/MigrateLibraryUserData.cs` (+1 -1) 📝 `Jellyfin.Server/Migrations/Routines/RefreshInternalDateModified.cs` (+9 -8) 📝 `MediaBrowser.Controller/Entities/BaseItem.cs` (+1 -1) 📝 `MediaBrowser.Controller/IServerApplicationHost.cs` (+2 -0) 📝 `MediaBrowser.Controller/LiveTv/LiveTvChannel.cs` (+5 -0) 📝 `MediaBrowser.Controller/LiveTv/LiveTvProgram.cs` (+5 -0) ➖ `MediaBrowser.Controller/Persistence/IItemTypeLookup.cs` (+0 -22) 📝 `src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemEntity.cs` (+1 -1) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/BaseItemKindEntity.cs` (+17 -0) 📝 `src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs` (+5 -0) 📝 `src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs` (+14 -14) ➕ `src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemKindConfiguration.cs` (+55 -0) _...and 4 more files_ </details> ### 📄 Description 1. Replace internal mapping from types to classes from code to DB (less DB space and better search) 2. Remove obsolete types (program, tvchannel) and map appropriate classes to other already existing classes. 3. Remove some extra indexes (too much of them) **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 10:06:24 +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#13854
No description provided.