mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
Fixed reference aggregate collections nullable when empty
This commit is contained in:
parent
4959232b27
commit
4b0a5ea8e9
@ -1368,7 +1368,7 @@ public sealed class BaseItemRepository(
|
|||||||
dto.TotalBitrate = entity.TotalBitrate;
|
dto.TotalBitrate = entity.TotalBitrate;
|
||||||
dto.ExternalId = entity.ExternalId;
|
dto.ExternalId = entity.ExternalId;
|
||||||
dto.Size = entity.Size;
|
dto.Size = entity.Size;
|
||||||
dto.Genres = entity.Genres?.Split('|');
|
dto.Genres = entity.Genres?.Split('|') ?? [];
|
||||||
dto.DateCreated = entity.DateCreated.GetValueOrDefault();
|
dto.DateCreated = entity.DateCreated.GetValueOrDefault();
|
||||||
dto.DateModified = entity.DateModified.GetValueOrDefault();
|
dto.DateModified = entity.DateModified.GetValueOrDefault();
|
||||||
dto.ChannelId = string.IsNullOrWhiteSpace(entity.ChannelId) ? Guid.Empty : Guid.Parse(entity.ChannelId);
|
dto.ChannelId = string.IsNullOrWhiteSpace(entity.ChannelId) ? Guid.Empty : Guid.Parse(entity.ChannelId);
|
||||||
@ -1398,9 +1398,9 @@ public sealed class BaseItemRepository(
|
|||||||
}
|
}
|
||||||
|
|
||||||
dto.ExtraIds = string.IsNullOrWhiteSpace(entity.ExtraIds) ? null : entity.ExtraIds.Split('|').Select(e => Guid.Parse(e)).ToArray();
|
dto.ExtraIds = string.IsNullOrWhiteSpace(entity.ExtraIds) ? null : entity.ExtraIds.Split('|').Select(e => Guid.Parse(e)).ToArray();
|
||||||
dto.ProductionLocations = entity.ProductionLocations?.Split('|');
|
dto.ProductionLocations = entity.ProductionLocations?.Split('|') ?? [];
|
||||||
dto.Studios = entity.Studios?.Split('|');
|
dto.Studios = entity.Studios?.Split('|') ?? [];
|
||||||
dto.Tags = entity.Tags?.Split('|');
|
dto.Tags = entity.Tags?.Split('|') ?? [];
|
||||||
|
|
||||||
if (dto is IHasProgramAttributes hasProgramAttributes)
|
if (dto is IHasProgramAttributes hasProgramAttributes)
|
||||||
{
|
{
|
||||||
@ -1440,12 +1440,12 @@ public sealed class BaseItemRepository(
|
|||||||
|
|
||||||
if (dto is IHasArtist hasArtists)
|
if (dto is IHasArtist hasArtists)
|
||||||
{
|
{
|
||||||
hasArtists.Artists = entity.Artists?.Split('|', StringSplitOptions.RemoveEmptyEntries);
|
hasArtists.Artists = entity.Artists?.Split('|', StringSplitOptions.RemoveEmptyEntries) ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dto is IHasAlbumArtist hasAlbumArtists)
|
if (dto is IHasAlbumArtist hasAlbumArtists)
|
||||||
{
|
{
|
||||||
hasAlbumArtists.AlbumArtists = entity.AlbumArtists?.Split('|', StringSplitOptions.RemoveEmptyEntries);
|
hasAlbumArtists.AlbumArtists = entity.AlbumArtists?.Split('|', StringSplitOptions.RemoveEmptyEntries) ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dto is LiveTvProgram program)
|
if (dto is LiveTvProgram program)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user