mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
26 lines
663 B
C#
26 lines
663 B
C#
using System;
|
|
using System.Linq;
|
|
using NzbDrone.Core.Model.Notification;
|
|
|
|
namespace NzbDrone.Core.Providers
|
|
{
|
|
public class NotificationProvider
|
|
{
|
|
private static ProgressNotification _currentNotification;
|
|
|
|
public virtual ProgressNotification GetCurrent()
|
|
{
|
|
if (_currentNotification == null || _currentNotification.CompletedTime < DateTime.Now.AddSeconds(-6))
|
|
{
|
|
return null;
|
|
}
|
|
|
|
return _currentNotification;
|
|
}
|
|
|
|
public virtual void Register(ProgressNotification notification)
|
|
{
|
|
_currentNotification = notification;
|
|
}
|
|
}
|
|
} |