2013-09-10 18:56:00 +00:00
|
|
|
|
using MediaBrowser.Controller.Library;
|
2018-12-13 13:18:25 +00:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
2013-09-10 18:56:00 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2016-08-18 15:13:18 +00:00
|
|
|
|
using MediaBrowser.Controller.Persistence;
|
2013-09-10 18:56:00 +00:00
|
|
|
|
|
2016-11-03 06:37:52 +00:00
|
|
|
|
namespace Emby.Server.Implementations.Library.Validators
|
2013-09-10 18:56:00 +00:00
|
|
|
|
{
|
|
|
|
|
/// <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;
|
2016-08-18 15:13:18 +00:00
|
|
|
|
private readonly IItemRepository _itemRepo;
|
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>
|
2016-08-18 15:13:18 +00:00
|
|
|
|
public ArtistsPostScanTask(ILibraryManager libraryManager, ILogger logger, IItemRepository itemRepo)
|
2013-09-10 18:56:00 +00:00
|
|
|
|
{
|
|
|
|
|
_libraryManager = libraryManager;
|
2015-01-17 18:15:09 +00:00
|
|
|
|
_logger = logger;
|
2016-08-18 15:13:18 +00:00
|
|
|
|
_itemRepo = itemRepo;
|
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)
|
|
|
|
|
{
|
2016-08-18 15:13:18 +00:00
|
|
|
|
return new ArtistsValidator(_libraryManager, _logger, _itemRepo).Run(progress, cancellationToken);
|
2013-09-10 18:56:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|