mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
replaced Json.Serialize with ToJson extension method.
This commit is contained in:
parent
676599c520
commit
8bdf8c31f0
10 changed files with 14 additions and 19 deletions
|
@ -71,7 +71,7 @@ namespace NzbDrone.Core.Notifications
|
|||
|
||||
var instanceType = newNotification.Instance.GetType();
|
||||
var baseGenArgs = instanceType.BaseType.GetGenericArguments();
|
||||
newNotification.Settings = (INotifcationSettings) Activator.CreateInstance(baseGenArgs[0]);
|
||||
newNotification.Settings = (INotifcationSettings)Activator.CreateInstance(baseGenArgs[0]);
|
||||
newNotification.Implementation = type.Name;
|
||||
|
||||
notifications.Add(newNotification);
|
||||
|
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Notifications
|
|||
{
|
||||
var definition = new NotificationDefinition();
|
||||
definition.InjectFrom(notification);
|
||||
definition.Settings = Json.Serialize(notification.Settings);
|
||||
definition.Settings = notification.Settings.ToJson();
|
||||
|
||||
definition = _notificationRepository.Insert(definition);
|
||||
notification.Id = definition.Id;
|
||||
|
@ -97,7 +97,7 @@ namespace NzbDrone.Core.Notifications
|
|||
{
|
||||
var definition = _notificationRepository.Get(notification.Id);
|
||||
definition.InjectFrom(notification);
|
||||
definition.Settings = Json.Serialize(notification.Settings);
|
||||
definition.Settings = notification.Settings.ToJson();
|
||||
|
||||
_notificationRepository.Update(definition);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue