using System; using System.Linq; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using MediaBrowser.Providers.Manager; using Microsoft.Extensions.Logging; namespace MediaBrowser.Providers.Music { /// /// The audio metadata service. /// public class AudioMetadataService : MetadataService { /// /// Initializes a new instance of the class. /// /// Instance of the . /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. public AudioMetadataService( IServerConfigurationManager serverConfigurationManager, ILogger logger, IProviderManager providerManager, IFileSystem fileSystem, ILibraryManager libraryManager) : base(serverConfigurationManager, logger, providerManager, fileSystem, libraryManager) { } 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