Fix usage of RegexOptions.Compiled

This commit is contained in:
cvium 2021-12-13 08:27:20 +01:00
parent 5c3d0b5510
commit 9e665ff520

View File

@ -60,9 +60,9 @@ namespace Emby.Naming.Video
{
var filename = Path.GetFileName(path);
var regex = new Regex(rule.Token, RegexOptions.IgnoreCase | RegexOptions.Compiled);
var isMatch = Regex.IsMatch(filename, rule.Token, RegexOptions.IgnoreCase | RegexOptions.Compiled);
if (regex.IsMatch(filename))
if (isMatch)
{
result.ExtraType = rule.ExtraType;
result.Rule = rule;