You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Core/Providers/NotificationProvider.cs

27 lines
697 B

using System;
using System.Collections.Generic;
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(-3))
14 years ago
{
return null;
14 years ago
}
return _currentNotification;
}
public virtual void Register(ProgressNotification notification)
{
_currentNotification = notification;
}
}
}