mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Cleaned up Notifications a bit
This commit is contained in:
parent
922d4becc5
commit
a153599d50
14 changed files with 23 additions and 62 deletions
|
@ -39,6 +39,7 @@ namespace NzbDrone.Core.Notifications
|
|||
|
||||
public List<Notification> All()
|
||||
{
|
||||
var test = _notificationRepository.All();//.Select(ToNotification).ToList();
|
||||
return _notificationRepository.All().Select(ToNotification).ToList();
|
||||
}
|
||||
|
||||
|
@ -50,15 +51,7 @@ namespace NzbDrone.Core.Notifications
|
|||
notification.OnDownload = definition.OnDownload;
|
||||
notification.Instance = GetInstance(definition);
|
||||
notification.Name = definition.Name;
|
||||
|
||||
if (notification.Instance.GetType().GetMethod("ImportSettingsFromJson") != null)
|
||||
{
|
||||
notification.Settings = ((dynamic)notification.Instance).ImportSettingsFromJson(definition.Settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
notification.Settings = NullSetting.Instance;
|
||||
}
|
||||
notification.Settings = ((dynamic)notification.Instance).ImportSettingsFromJson(definition.Settings);
|
||||
|
||||
return notification;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue