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

Closed
opened 2026-02-07 07:23:32 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

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

Base: masterHead: jellyfin/feature/base_type_as_int


📝 Commits (1)

  • 245554a Refactor Type in BaseItem from String to integer with FK support

📊 Changes

25 files changed (+2718 additions, -297 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 (+45 -63)
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 (+54 -0)

...and 5 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 item kinds.
  3. Remove some extra indexes (too much of them)
  4. REmoved one obsolete tests (we don't need to convert BaseItemKind directly from class name anymore, instead GetBaseItemKind should take in place)

🔄 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/14609 **Author:** [@icegood](https://github.com/icegood) **Created:** 8/8/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `jellyfin/feature/base_type_as_int` --- ### 📝 Commits (1) - [`245554a`](https://github.com/jellyfin/jellyfin/commit/245554a77771c35122d9e069612f166f73696d77) Refactor Type in BaseItem from String to integer with FK support ### 📊 Changes **25 files changed** (+2718 additions, -297 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` (+45 -63) ➕ `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` (+54 -0) _...and 5 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 item kinds. 3. Remove some extra indexes (too much of them) 4. REmoved one obsolete tests (we don't need to convert BaseItemKind directly from class name anymore, instead GetBaseItemKind should take in place) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:23:32 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14050