You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
604 B
19 lines
604 B
using Recyclarr.TrashLib.Services.Sonarr.Config;
|
|
|
|
namespace Recyclarr.TrashLib.Services.ReleaseProfile.Filters;
|
|
|
|
public class ReleaseProfileFilterPipeline : IReleaseProfileFilterPipeline
|
|
{
|
|
private readonly IOrderedEnumerable<IReleaseProfileFilter> _filters;
|
|
|
|
public ReleaseProfileFilterPipeline(IOrderedEnumerable<IReleaseProfileFilter> filters)
|
|
{
|
|
_filters = filters;
|
|
}
|
|
|
|
public ReleaseProfileData Process(ReleaseProfileData profile, ReleaseProfileConfig config)
|
|
{
|
|
return _filters.Aggregate(profile, (current, filter) => filter.Transform(current, config));
|
|
}
|
|
}
|