Fixed: Include matching value of preferred word regex, not actual regex

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick
2019-02-27 22:09:08 -05:00
parent 27ebe36454
commit 1cc12446b6
11 changed files with 147 additions and 88 deletions
@@ -13,13 +13,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{
private readonly Logger _logger;
private readonly IReleaseProfileService _releaseProfileService;
private readonly ITermMatcher _termMatcher;
private readonly ITermMatcherService _termMatcherService;
public ReleaseRestrictionsSpecification(ITermMatcher termMatcher, IReleaseProfileService releaseProfileService, Logger logger)
public ReleaseRestrictionsSpecification(ITermMatcherService termMatcherService, IReleaseProfileService releaseProfileService, Logger logger)
{
_logger = logger;
_releaseProfileService = releaseProfileService;
_termMatcher = termMatcher;
_termMatcherService = termMatcherService;
}
public SpecificationPriority Priority => SpecificationPriority.Default;
@@ -67,7 +67,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
private List<string> ContainsAny(List<string> terms, string title)
{
return terms.Where(t => _termMatcher.IsMatch(t, title)).ToList();
return terms.Where(t => _termMatcherService.IsMatch(t, title)).ToList();
}
}
}