aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Images
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-12-19 15:21:42 +0100
committerBond_009 <bond.009@outlook.com>2022-12-19 15:21:42 +0100
commit6481376b81c52af0b29eea997ce44de0de862ac8 (patch)
tree046163c8d357783439f9b849bc07012abf3fd206 /Emby.Server.Implementations/Images
parent411246e90f19f652168878e0edc703fdc9ff32d9 (diff)
Use DistinctBy introduced in .NET 6
Diffstat (limited to 'Emby.Server.Implementations/Images')
-rw-r--r--Emby.Server.Implementations/Images/DynamicImageProvider.cs3
-rw-r--r--Emby.Server.Implementations/Images/PlaylistImageProvider.cs3
2 files changed, 2 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Images/DynamicImageProvider.cs b/Emby.Server.Implementations/Images/DynamicImageProvider.cs
index 82690f8a9..0bd5fdce0 100644
--- a/Emby.Server.Implementations/Images/DynamicImageProvider.cs
+++ b/Emby.Server.Implementations/Images/DynamicImageProvider.cs
@@ -81,8 +81,7 @@ namespace Emby.Server.Implementations.Images
}
return i;
- }).GroupBy(x => x.Id)
- .Select(x => x.First());
+ }).DistinctBy(x => x.Id);
List<BaseItem> returnItems;
if (isUsingCollectionStrip)
diff --git a/Emby.Server.Implementations/Images/PlaylistImageProvider.cs b/Emby.Server.Implementations/Images/PlaylistImageProvider.cs
index 580151287..3326d21ac 100644
--- a/Emby.Server.Implementations/Images/PlaylistImageProvider.cs
+++ b/Emby.Server.Implementations/Images/PlaylistImageProvider.cs
@@ -58,8 +58,7 @@ namespace Emby.Server.Implementations.Images
return null;
})
.Where(i => i is not null)
- .GroupBy(x => x.Id)
- .Select(x => x.First())
+ .DistinctBy(x => x.Id)
.ToList();
}
}