aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Dto
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2025-09-25 00:20:30 +0300
committerGitHub <noreply@github.com>2025-09-24 15:20:30 -0600
commit5a6d9180fed81a30cb91ef3fed30176cd4402116 (patch)
treec67bfa1cfe27ff1a7b7a09e3a7d201ef543652a0 /Emby.Server.Implementations/Dto
parent897975fc57f1669322f6db18753939dbf6be43e8 (diff)
Add People Dedup and multiple progress fixes (#14848)
Diffstat (limited to 'Emby.Server.Implementations/Dto')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs27
1 files changed, 6 insertions, 21 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 0db1606ea..c5dc3b054 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1051,30 +1051,15 @@ namespace Emby.Server.Implementations.Dto
// Include artists that are not in the database yet, e.g., just added via metadata editor
// var foundArtists = artistItems.Items.Select(i => i.Item1.Name).ToList();
- dto.ArtistItems = hasArtist.Artists
- // .Except(foundArtists, new DistinctNameComparer())
+ dto.ArtistItems = _libraryManager.GetArtists([.. hasArtist.Artists.Where(e => !string.IsNullOrWhiteSpace(e))])
+ .Where(e => e.Value.Length > 0)
.Select(i =>
{
- // This should not be necessary but we're seeing some cases of it
- if (string.IsNullOrEmpty(i))
- {
- return null;
- }
-
- var artist = _libraryManager.GetArtist(i, new DtoOptions(false)
- {
- EnableImages = false
- });
- if (artist is not null)
+ return new NameGuidPair
{
- return new NameGuidPair
- {
- Name = artist.Name,
- Id = artist.Id
- };
- }
-
- return null;
+ Name = i.Key,
+ Id = i.Value.First().Id
+ };
}).Where(i => i is not null).ToArray();
}