Remove unnecessary array allocation

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
pull/7176/head
Dmitry Lyzo 3 years ago committed by GitHub
parent 5aa748058e
commit 54549cd5b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1108,8 +1108,7 @@ namespace Emby.Server.Implementations.Dto
}
else
{
allExtras ??= item.GetExtras().ToArray();
dto.LocalTrailerCount = allExtras.Count(i => i.ExtraType == ExtraType.Trailer);
dto.LocalTrailerCount = (allExtras ?? item.GetExtras()).Count(i => i.ExtraType == ExtraType.Trailer);
}
}

Loading…
Cancel
Save