using System.Collections.Generic; using NzbDrone.Core.Download; namespace Prowlarr.Api.V1.DownloadClient { public class DownloadClientBulkResource : ProviderBulkResource { public bool? Enable { get; set; } public int? Priority { get; set; } } public class DownloadClientBulkResourceMapper : ProviderBulkResourceMapper { public override List UpdateModel(DownloadClientBulkResource resource, List existingDefinitions) { if (resource == null) { return new List(); } existingDefinitions.ForEach(existing => { existing.Enable = resource.Enable ?? existing.Enable; existing.Priority = resource.Priority ?? existing.Priority; }); return existingDefinitions; } } }