2011-06-07 06:29:07 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
2011-06-14 01:23:04 +00:00
|
|
|
|
using Ninject;
|
2011-06-07 06:29:07 +00:00
|
|
|
|
using NLog;
|
2011-10-12 03:44:19 +00:00
|
|
|
|
using NzbDrone.Core.Model;
|
2011-06-07 21:19:11 +00:00
|
|
|
|
using NzbDrone.Core.Model.Notification;
|
2011-06-07 06:29:07 +00:00
|
|
|
|
using NzbDrone.Core.Providers.Core;
|
|
|
|
|
|
2011-06-07 21:19:11 +00:00
|
|
|
|
namespace NzbDrone.Core.Providers.Jobs
|
2011-06-07 06:29:07 +00:00
|
|
|
|
{
|
2011-06-07 21:19:11 +00:00
|
|
|
|
public class PostDownloadScanJob : IJob
|
2011-06-07 06:29:07 +00:00
|
|
|
|
{
|
2011-10-12 23:47:28 +00:00
|
|
|
|
private readonly PostDownloadProvider _postDownloadProvider;
|
2011-06-07 06:29:07 +00:00
|
|
|
|
|
2011-06-14 01:23:04 +00:00
|
|
|
|
[Inject]
|
2011-10-12 23:47:28 +00:00
|
|
|
|
public PostDownloadScanJob(PostDownloadProvider postDownloadProvider)
|
2011-06-07 06:29:07 +00:00
|
|
|
|
{
|
2011-10-12 23:47:28 +00:00
|
|
|
|
_postDownloadProvider = postDownloadProvider;
|
2011-06-07 06:29:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2011-06-07 21:19:11 +00:00
|
|
|
|
public PostDownloadScanJob()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
2011-07-05 06:52:06 +00:00
|
|
|
|
get { return "Drop folder monitor"; }
|
2011-06-07 21:19:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int DefaultInterval
|
|
|
|
|
{
|
|
|
|
|
get { return 1; }
|
|
|
|
|
}
|
2011-06-07 06:29:07 +00:00
|
|
|
|
|
2011-08-22 00:48:37 +00:00
|
|
|
|
public virtual void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
2011-06-07 06:29:07 +00:00
|
|
|
|
{
|
2011-10-14 15:37:19 +00:00
|
|
|
|
_postDownloadProvider.ScanDropFolder(notification);
|
2011-06-07 06:29:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2011-08-26 06:23:21 +00:00
|
|
|
|
}
|