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
1 year ago
|
using Recyclarr.TrashLib.Services.Sonarr.Config;
|
||
2 years ago
|
|
||
1 year ago
|
namespace Recyclarr.TrashLib.Services.ReleaseProfile.Filters;
|
||
2 years ago
|
|
||
|
public class ReleaseProfileFilterPipeline : IReleaseProfileFilterPipeline
|
||
|
{
|
||
|
private readonly IOrderedEnumerable<IReleaseProfileFilter> _filters;
|
||
|
|
||
|
public ReleaseProfileFilterPipeline(IOrderedEnumerable<IReleaseProfileFilter> filters)
|
||
|
{
|
||
|
_filters = filters;
|
||
|
}
|
||
|
|
||
|
public ReleaseProfileData Process(ReleaseProfileData profile, ReleaseProfileConfig config)
|
||
|
{
|
||
2 years ago
|
return _filters.Aggregate(profile, (current, filter) => filter.Transform(current, config));
|
||
2 years ago
|
}
|
||
|
}
|