external notifications are now based on Events.

This commit is contained in:
kay.one 2013-02-24 15:47:57 -08:00
commit 5fc25b6095
32 changed files with 542 additions and 619 deletions

View file

@ -0,0 +1,23 @@
using System.Linq;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.ExternalNotification
{
public interface IExternalNotificationRepository : IBasicRepository<ExternalNotificationDefinition>
{
ExternalNotificationDefinition Get(string name);
}
public class ExternalNotificationRepository : BasicRepository<ExternalNotificationDefinition>, IExternalNotificationRepository
{
public ExternalNotificationRepository(IObjectDatabase objectDatabase)
: base(objectDatabase)
{
}
public ExternalNotificationDefinition Get(string name)
{
return Queryable.SingleOrDefault(c => c.Name.ToLower() == name.ToLower());
}
}
}