aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-03-28 14:17:33 +0100
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-03-28 14:17:33 +0100
commite266ad51c52763f11a2eab9ac86f638542a4ddb0 (patch)
treed0f352914003d9ca32d76d6ae91c9676a702f7eb /Emby.Server.Implementations
parentea306e8f6d28e4c4acb78ee7208508d329473414 (diff)
Simplify logic; remove unnecessary methods
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index a10e17f6ad..f8cf00cb3b 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1057,13 +1057,13 @@ namespace Emby.Server.Implementations.Dto
if (options.ContainsField(ItemFields.SpecialFeatureCount))
{
allExtras = item.GetExtras().ToArray();
- dto.SpecialFeatureCount = allExtras.Count(i => i.HasExtraType(BaseItem.DisplayExtraTypes, true));
+ dto.SpecialFeatureCount = allExtras.Count(i => BaseItem.DisplayExtraTypes.Contains(i.ExtraType));
}
if (options.ContainsField(ItemFields.LocalTrailerCount))
{
allExtras = allExtras ?? item.GetExtras().ToArray();
- dto.LocalTrailerCount = allExtras.Count(i => i.HasExtraType(new[] { ExtraType.Trailer }, false));
+ dto.LocalTrailerCount = allExtras.Count(i => i.ExtraType == ExtraType.Trailer);
if (item is IHasTrailers hasTrailers)
{