diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2025-02-14 11:19:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-13 20:19:24 -0700 |
| commit | fa97e8e183a214e9d4af83299cfb5e74bb78ce03 (patch) | |
| tree | f55dbd3f575103cf564e8b7753cce18e8b27869c /Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | |
| parent | b2a2fd6fcc0df356f29ddd1898c64ad87099dd18 (diff) | |
Write only for query columns to EFCore db (#13542)
* Write only for query columns to EFCore db.
We currently don't write the columns that do not exist on the BaseItem class definition in db. However, columns like `CleanName` is still useful and being used by internal queries and current behavior would cause such query to return nothing.
The only exception is the UserDataKey which is not even being used for internal query that can be omitted.
* Update comment
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/BaseItemRepository.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index fa026214b..c4f6bf5aa 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -689,6 +689,7 @@ public sealed class BaseItemRepository entity.IndexNumber = dto.IndexNumber; entity.IsLocked = dto.IsLocked; entity.Name = dto.Name; + entity.CleanName = GetCleanValue(dto.Name); entity.OfficialRating = dto.OfficialRating; entity.Overview = dto.Overview; entity.ParentIndexNumber = dto.ParentIndexNumber; @@ -821,10 +822,9 @@ public sealed class BaseItemRepository entity.StartDate = hasStartDate.StartDate; } + entity.UnratedType = dto.GetBlockUnratedType().ToString(); + // Fields that are present in the DB but are never actually used - // dto.UnratedType = entity.UnratedType; - // dto.TopParentId = entity.TopParentId; - // dto.CleanName = entity.CleanName; // dto.UserDataKey = entity.UserDataKey; if (dto is Folder folder) |
