mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 00:34:37 +02:00
Update updates ;)
This commit is contained in:
33
NzbDrone.Core/Providers/Jobs/AppUpdateJob.cs
Normal file
33
NzbDrone.Core/Providers/Jobs/AppUpdateJob.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
|
||||
namespace NzbDrone.Core.Providers.Jobs
|
||||
{
|
||||
public class AppUpdateJob : IJob
|
||||
{
|
||||
private readonly UpdateProvider _updateProvider;
|
||||
|
||||
public AppUpdateJob(UpdateProvider updateProvider)
|
||||
{
|
||||
_updateProvider = updateProvider;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Update Application Job"; }
|
||||
}
|
||||
|
||||
public int DefaultInterval
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public virtual void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
||||
{
|
||||
notification.CurrentMessage = "Updating NzbDrone";
|
||||
|
||||
var updatePackage = _updateProvider.GetAvilableUpdate();
|
||||
|
||||
_updateProvider.StartUpgrade(updatePackage);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user