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.
24 lines
619 B
24 lines
619 B
using TrashLib.Sonarr.Config;
|
|
|
|
namespace TrashLib.Sonarr.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)
|
|
{
|
|
foreach (var filter in _filters)
|
|
{
|
|
profile = filter.Transform(profile, config);
|
|
}
|
|
|
|
return profile;
|
|
}
|
|
}
|