2013-09-10 11:56:00 -07:00
|
|
|
|
using MediaBrowser.Controller.Library;
|
2015-01-17 11:15:09 -07:00
|
|
|
|
using MediaBrowser.Model.Logging;
|
2013-09-10 11:56:00 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.Library.Validators
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class GameGenresPostScanTask
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class GameGenresPostScanTask : ILibraryPostScanTask
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The _library manager
|
|
|
|
|
/// </summary>
|
|
|
|
|
private readonly ILibraryManager _libraryManager;
|
2015-01-17 11:15:09 -07:00
|
|
|
|
private readonly ILogger _logger;
|
2013-09-10 11:56:00 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-02-08 13:22:40 -07:00
|
|
|
|
/// Initializes a new instance of the <see cref="GameGenresPostScanTask" /> class.
|
2013-09-10 11:56:00 -07:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="libraryManager">The library manager.</param>
|
2015-01-17 11:15:09 -07:00
|
|
|
|
/// <param name="logger">The logger.</param>
|
|
|
|
|
public GameGenresPostScanTask(ILibraryManager libraryManager, ILogger logger)
|
2013-09-10 11:56:00 -07:00
|
|
|
|
{
|
|
|
|
|
_libraryManager = libraryManager;
|
2015-01-17 11:15:09 -07:00
|
|
|
|
_logger = logger;
|
2013-09-10 11:56:00 -07: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 11:15:09 -07:00
|
|
|
|
return new GameGenresValidator(_libraryManager, _logger).Run(progress, cancellationToken);
|
2013-09-10 11:56:00 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|