diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2025-02-05 08:02:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-04 17:02:07 -0700 |
| commit | 2de04cb07c3b5f02fb5d5d9892541614e990cbe0 (patch) | |
| tree | fb4dff0eb0ca0795cf632e1762384bb7abc8423d /Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | |
| parent | e7f32fb174d034e8c3975073ba2d889bbad2a470 (diff) | |
Make StartDate/EndDate nullable (#13494)
These dates are used as birthdate and death date for person (ask luke for why) and a non-nullable column would cause the null date become 1901-01-01, making all living people dead.
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/BaseItemRepository.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index 80604812c..f9a9837f1 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -645,7 +645,7 @@ public sealed class BaseItemRepository // dto.MediaType = Enum.TryParse<MediaType>(entity.MediaType); if (dto is IHasStartDate hasStartDate) { - hasStartDate.StartDate = entity.StartDate; + hasStartDate.StartDate = entity.StartDate.GetValueOrDefault(); } // Fields that are present in the DB but are never actually used @@ -683,7 +683,7 @@ public sealed class BaseItemRepository entity.ParentId = !dto.ParentId.IsEmpty() ? dto.ParentId : null; entity.Path = GetPathToSave(dto.Path); - entity.EndDate = dto.EndDate.GetValueOrDefault(); + entity.EndDate = dto.EndDate; entity.CommunityRating = dto.CommunityRating; entity.CustomRating = dto.CustomRating; entity.IndexNumber = dto.IndexNumber; |
