using MediaBrowser.Common.Progress; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.Server.Implementations.Library.Validators { /// /// Class ArtistsValidator /// public class ArtistsValidator { /// /// The _library manager /// private readonly ILibraryManager _libraryManager; /// /// The _user manager /// private readonly IUserManager _userManager; /// /// The _logger /// private readonly ILogger _logger; /// /// Initializes a new instance of the class. /// /// The library manager. /// The user manager. /// The logger. public ArtistsValidator(ILibraryManager libraryManager, IUserManager userManager, ILogger logger) { _libraryManager = libraryManager; _userManager = userManager; _logger = logger; } /// /// Runs the specified progress. /// /// The progress. /// The cancellation token. /// Task. public async Task Run(IProgress progress, CancellationToken cancellationToken) { var allItems = _libraryManager.RootFolder.RecursiveChildren.ToArray(); var allMusicArtists = allItems.OfType().ToArray(); var allSongs = allItems.OfType