mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
Fixed: Significantly improved api performance.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NzbDrone.Core.Notifications;
|
||||
using System;
|
||||
using NzbDrone.Core.Notifications;
|
||||
|
||||
namespace NzbDrone.Api.Notifications
|
||||
{
|
||||
@@ -9,6 +10,36 @@ namespace NzbDrone.Api.Notifications
|
||||
{
|
||||
}
|
||||
|
||||
protected override void MapToResource(NotificationResource resource, NotificationDefinition definition)
|
||||
{
|
||||
base.MapToResource(resource, definition);
|
||||
|
||||
resource.OnGrab = definition.OnGrab;
|
||||
resource.OnDownload = definition.OnDownload;
|
||||
resource.OnUpgrade = definition.OnUpgrade;
|
||||
resource.OnRename = definition.OnRename;
|
||||
resource.SupportsOnGrab = definition.SupportsOnGrab;
|
||||
resource.SupportsOnDownload = definition.SupportsOnDownload;
|
||||
resource.SupportsOnUpgrade = definition.SupportsOnUpgrade;
|
||||
resource.SupportsOnRename = definition.SupportsOnRename;
|
||||
resource.Tags = definition.Tags;
|
||||
}
|
||||
|
||||
protected override void MapToModel(NotificationDefinition definition, NotificationResource resource)
|
||||
{
|
||||
base.MapToModel(definition, resource);
|
||||
|
||||
definition.OnGrab = resource.OnGrab;
|
||||
definition.OnDownload = resource.OnDownload;
|
||||
definition.OnUpgrade = resource.OnUpgrade;
|
||||
definition.OnRename = resource.OnRename;
|
||||
definition.SupportsOnGrab = resource.SupportsOnGrab;
|
||||
definition.SupportsOnDownload = resource.SupportsOnDownload;
|
||||
definition.SupportsOnUpgrade = resource.SupportsOnUpgrade;
|
||||
definition.SupportsOnRename = resource.SupportsOnRename;
|
||||
definition.Tags = resource.Tags;
|
||||
}
|
||||
|
||||
protected override void Validate(NotificationDefinition definition, bool includeWarnings)
|
||||
{
|
||||
if (!definition.OnGrab && !definition.OnDownload) return;
|
||||
|
||||
Reference in New Issue
Block a user