mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 14:33:06 +03:00
Remove unnecessary array allocation
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
@@ -1108,8 +1108,7 @@ namespace Emby.Server.Implementations.Dto
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
allExtras ??= item.GetExtras().ToArray();
|
dto.LocalTrailerCount = (allExtras ?? item.GetExtras()).Count(i => i.ExtraType == ExtraType.Trailer);
|
||||||
dto.LocalTrailerCount = allExtras.Count(i => i.ExtraType == ExtraType.Trailer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user