aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authortheguymadmax <theguymadmax@proton.me>2026-04-14 12:38:01 -0400
committerGitHub <noreply@github.com>2026-04-14 18:38:01 +0200
commit5bad7b8ae324ccf0d4eb3051d0944edfddfdb50b (patch)
tree2e1f08d2cfa85c4171203ff28f587066dd64cf84 /Emby.Server.Implementations
parentfb33b725e064f0954c5a4f2af17041b7552eb6e1 (diff)
Fix artist metadata not being fetched on initial library scan (#16606)HEADmaster
* Fix artist metadata not being fetched on initial library scan * Update Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs Co-authored-by: Bond-009 <bond.009@outlook.com> --------- Co-authored-by: Bond-009 <bond.009@outlook.com>
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs11
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)
{