2013-09-10 18:56:00 +00:00
|
|
|
|
using MediaBrowser.Controller.Library;
|
2015-01-17 18:15:09 +00:00
|
|
|
|
using MediaBrowser.Model.Logging;
|
2013-09-10 18:56:00 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.Library.Validators
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class ArtistsPostScanTask
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ArtistsPostScanTask : ILibraryPostScanTask
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The _library manager
|
|
|
|
|
/// </summary>
|
|
|
|
|
private readonly ILibraryManager _libraryManager;
|
2015-01-17 18:15:09 +00:00
|
|
|
|
private readonly ILogger _logger;
|
2013-09-10 18:56:00 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="ArtistsPostScanTask" /> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="libraryManager">The library manager.</param>
|
2015-01-17 18:15:09 +00:00
|
|
|
|
public ArtistsPostScanTask(ILibraryManager libraryManager, ILogger logger)
|
2013-09-10 18:56:00 +00:00
|
|
|
|
{
|
|
|
|
|
_libraryManager = libraryManager;
|
2015-01-17 18:15:09 +00:00
|
|
|
|
_logger = logger;
|
2013-09-10 18:56:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Runs the specified progress.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
|
|
|
|
{
|
2015-01-17 18:15:09 +00:00
|
|
|
|
return new ArtistsValidator(_libraryManager, _logger).Run(progress, cancellationToken);
|
2013-09-10 18:56:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|