mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 01:38:24 +00:00
23118871fd
New: Recycle Bin is now available
36 lines
No EOL
869 B
C#
36 lines
No EOL
869 B
C#
using System.Linq;
|
|
using System;
|
|
using Ninject;
|
|
using NLog;
|
|
using NzbDrone.Core.Model.Notification;
|
|
using NzbDrone.Core.Providers;
|
|
using NzbDrone.Core.Providers.Converting;
|
|
|
|
namespace NzbDrone.Core.Jobs
|
|
{
|
|
public class CleanupRecycleBinJob : IJob
|
|
{
|
|
private readonly RecycleBinProvider _recycleBinProvider;
|
|
|
|
[Inject]
|
|
public CleanupRecycleBinJob(RecycleBinProvider recycleBinProvider)
|
|
{
|
|
_recycleBinProvider = recycleBinProvider;
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get { return "Cleanup Recycle Bin"; }
|
|
}
|
|
|
|
public TimeSpan DefaultInterval
|
|
{
|
|
get { return TimeSpan.FromDays(24); }
|
|
}
|
|
|
|
public void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
|
{
|
|
_recycleBinProvider.Cleanup();
|
|
}
|
|
}
|
|
} |