diff options
| author | MBR-0001 <55142207+MBR-0001@users.noreply.github.com> | 2026-04-18 17:14:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-18 17:14:31 +0200 |
| commit | a2eff41d6617bed7a7c5518d00f227a2406a8421 (patch) | |
| tree | 933386669537d5145ca6b3706728454aff27d703 /Emby.Server.Implementations/Library/Validators | |
| parent | d4a46bc6291560b35a9b64fb88b68019f903d0ef (diff) | |
| parent | 5aa093d2997d8120ce19037642556070d27ce0bb (diff) | |
Merge branch 'master' into removeGlobalSubtitleConfiguration
Diffstat (limited to 'Emby.Server.Implementations/Library/Validators')
| -rw-r--r-- | Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs index 7cc851b73b..ef20ae9bca 100644 --- a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs @@ -50,6 +50,10 @@ public class ArtistsValidator public async Task Run(IProgress<double> progress, CancellationToken cancellationToken) { var names = _itemRepo.GetAllArtistNames(); + var existingArtistIds = _libraryManager.GetItemIds(new InternalItemsQuery + { + IncludeItemTypes = [BaseItemKind.MusicArtist] + }).ToHashSet(); var numComplete = 0; var count = names.Count; @@ -59,8 +63,13 @@ public class ArtistsValidator try { var item = _libraryManager.GetArtist(name); + var isNew = !existingArtistIds.Contains(item.Id); + var neverRefreshed = item.DateLastRefreshed == default; - await item.RefreshMetadata(cancellationToken).ConfigureAwait(false); + if (isNew || neverRefreshed) + { + await item.RefreshMetadata(cancellationToken).ConfigureAwait(false); + } } catch (OperationCanceledException) { |
