mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Fixed trakt searching, cleaned up indexer/notification modules
This commit is contained in:
parent
9181b1bb91
commit
f21a235c00
7 changed files with 35 additions and 25 deletions
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Api.ClientSchema;
|
||||
using NzbDrone.Api.Mapping;
|
||||
using NzbDrone.Api.REST;
|
||||
using NzbDrone.Core.Notifications;
|
||||
using Omu.ValueInjecter;
|
||||
|
@ -47,11 +48,10 @@ namespace NzbDrone.Api.Notifications
|
|||
notification = _notificationService.Create(notification);
|
||||
notificationResource.Id = notification.Id;
|
||||
|
||||
var responseResource = new NotificationResource();
|
||||
responseResource.InjectFrom(notification);
|
||||
responseResource.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
|
||||
var response = notification.InjectTo<NotificationResource>();
|
||||
response.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
|
||||
|
||||
return responseResource;
|
||||
return response;
|
||||
}
|
||||
|
||||
private NotificationResource Update(NotificationResource notificationResource)
|
||||
|
@ -60,11 +60,10 @@ namespace NzbDrone.Api.Notifications
|
|||
notification.Id = notificationResource.Id;
|
||||
notification = _notificationService.Update(notification);
|
||||
|
||||
var responseResource = new NotificationResource();
|
||||
responseResource.InjectFrom(notification);
|
||||
responseResource.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
|
||||
var response = notification.InjectTo<NotificationResource>();
|
||||
response.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
|
||||
|
||||
return responseResource;
|
||||
return response;
|
||||
}
|
||||
|
||||
private void DeleteNotification(int id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue