Remove unnecessary array allocation
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
parent
5aa748058e
commit
54549cd5b5
|
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user