diff --git a/MediaBrowser.Providers/Music/AudioMetadataService.cs b/MediaBrowser.Providers/Music/AudioMetadataService.cs index 7c38d0bcf..a5b7cb895 100644 --- a/MediaBrowser.Providers/Music/AudioMetadataService.cs +++ b/MediaBrowser.Providers/Music/AudioMetadataService.cs @@ -33,6 +33,21 @@ namespace MediaBrowser.Providers.Music { } + private void SetProviderId(Audio sourceItem, Audio targetItem, bool replaceData, MetadataProvider provider) + { + var target = targetItem.GetProviderId(provider); + if (replaceData || string.IsNullOrEmpty(target)) + { + var source = sourceItem.GetProviderId(provider); + if (!string.IsNullOrEmpty(source) + && (string.IsNullOrEmpty(target) + || !target.Equals(source, StringComparison.Ordinal))) + { + targetItem.SetProviderId(provider, source); + } + } + } + /// protected override void MergeData(MetadataResult