diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-25 22:43:04 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-25 22:43:04 -0500 |
| commit | 2d06095447b972c8c7239277428e2c67c8b7ca86 (patch) | |
| tree | 14278bd4c0732ee962b73ff4845e5022e157a0a3 /MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs | |
| parent | 364fbb9e0c7586afa296ddd7d739df086f4c3533 (diff) | |
plugin security fixes and other abstractions
Diffstat (limited to 'MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs')
| -rw-r--r-- | MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs b/MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs index 595de684d..4448b7439 100644 --- a/MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs +++ b/MediaBrowser.Controller/ScheduledTasks/PeopleValidationTask.cs @@ -1,5 +1,4 @@ using MediaBrowser.Common.ScheduledTasks; -using MediaBrowser.Model.Logging; using System; using System.Collections.Generic; using System.Threading; @@ -10,23 +9,24 @@ namespace MediaBrowser.Controller.ScheduledTasks /// <summary> /// Class PeopleValidationTask /// </summary> - public class PeopleValidationTask : BaseScheduledTask<Kernel> + public class PeopleValidationTask : IScheduledTask { + private readonly Kernel _kernel; + /// <summary> /// Initializes a new instance of the <see cref="PeopleValidationTask" /> class. /// </summary> /// <param name="kernel">The kernel.</param> - /// <param name="logger"></param> - public PeopleValidationTask(Kernel kernel, ITaskManager taskManager, ILogger logger) - : base(kernel, taskManager, logger) + public PeopleValidationTask(Kernel kernel) { + _kernel = kernel; } /// <summary> /// Creates the triggers that define when the task will run /// </summary> /// <returns>IEnumerable{BaseTaskTrigger}.</returns> - public override IEnumerable<ITaskTrigger> GetDefaultTriggers() + public IEnumerable<ITaskTrigger> GetDefaultTriggers() { return new ITaskTrigger[] { @@ -42,16 +42,16 @@ namespace MediaBrowser.Controller.ScheduledTasks /// <param name="cancellationToken">The cancellation token.</param> /// <param name="progress">The progress.</param> /// <returns>Task.</returns> - protected override Task ExecuteInternal(CancellationToken cancellationToken, IProgress<double> progress) + public Task Execute(CancellationToken cancellationToken, IProgress<double> progress) { - return Kernel.LibraryManager.ValidatePeople(cancellationToken, progress); + return _kernel.LibraryManager.ValidatePeople(cancellationToken, progress); } /// <summary> /// Gets the name of the task /// </summary> /// <value>The name.</value> - public override string Name + public string Name { get { return "Refresh people"; } } @@ -60,7 +60,7 @@ namespace MediaBrowser.Controller.ScheduledTasks /// Gets the description. /// </summary> /// <value>The description.</value> - public override string Description + public string Description { get { return "Updates metadata for actors, artists and directors in your media library."; } } @@ -69,7 +69,7 @@ namespace MediaBrowser.Controller.ScheduledTasks /// Gets the category. /// </summary> /// <value>The category.</value> - public override string Category + public string Category { get { |
