using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Logging;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Library.Validators
{
class PeoplePostScanTask : ILibraryPostScanTask
{
///
/// The _library manager
///
private readonly ILibraryManager _libraryManager;
///
/// The _logger
///
private readonly ILogger _logger;
public PeoplePostScanTask(ILibraryManager libraryManager, ILogger logger)
{
_libraryManager = libraryManager;
_logger = logger;
}
///
/// Runs the specified progress.
///
/// The progress.
/// The cancellation token.
/// Task.
public Task Run(IProgress progress, CancellationToken cancellationToken)
{
return new PeopleValidator(_libraryManager, _logger).ValidatePeople(cancellationToken, new MetadataRefreshOptions
{
ImageRefreshMode = ImageRefreshMode.ValidationOnly,
MetadataRefreshMode = MetadataRefreshMode.None
}, progress);
}
}
}