2012-09-04 08:49:04 +02:00
|
|
|
using System;
|
2013-03-05 06:37:33 +01:00
|
|
|
using System.Linq;
|
2012-09-04 08:49:04 +02:00
|
|
|
using NzbDrone.Core.Model.Notification;
|
|
|
|
using NzbDrone.Core.Providers;
|
|
|
|
|
2013-03-05 06:37:33 +01:00
|
|
|
namespace NzbDrone.Core.Jobs.Implementations
|
2012-09-04 08:49:04 +02:00
|
|
|
{
|
|
|
|
public class CleanupRecycleBinJob : IJob
|
|
|
|
{
|
|
|
|
private readonly RecycleBinProvider _recycleBinProvider;
|
|
|
|
|
|
|
|
public CleanupRecycleBinJob(RecycleBinProvider recycleBinProvider)
|
|
|
|
{
|
|
|
|
_recycleBinProvider = recycleBinProvider;
|
|
|
|
}
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
{
|
|
|
|
get { return "Cleanup Recycle Bin"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public TimeSpan DefaultInterval
|
|
|
|
{
|
|
|
|
get { return TimeSpan.FromDays(24); }
|
|
|
|
}
|
|
|
|
|
2012-09-10 21:04:17 +02:00
|
|
|
public void Start(ProgressNotification notification, dynamic options)
|
2012-09-04 08:49:04 +02:00
|
|
|
{
|
|
|
|
_recycleBinProvider.Cleanup();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|