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.
recyclarr/src/Recyclarr.Cli/Pipelines/ReleaseProfile/Filters/IncludeExcludeFilter.cs

22 lines
637 B

using Recyclarr.Config.Models;
using Recyclarr.TrashGuide.ReleaseProfile;
namespace Recyclarr.Cli.Pipelines.ReleaseProfile.Filters;
public class IncludeExcludeFilter(ILogger log) : IReleaseProfileFilter
{
private readonly ReleaseProfileDataFilterer _filterer = new(log);
public ReleaseProfileData Transform(ReleaseProfileData profile, ReleaseProfileConfig config)
{
if (config.Filter == null)
{
return profile;
}
log.Debug("This profile will be filtered");
var newProfile = _filterer.FilterProfile(profile, config.Filter);
return newProfile ?? profile;
}
}