Only check next chapter is possible

This commit is contained in:
TwistedUmbrellaX 2024-03-06 08:56:19 -05:00
parent 05541b9db0
commit 7e2f1b56d5
2 changed files with 12 additions and 10 deletions

1
.gitignore vendored
View File

@ -8,4 +8,3 @@ docker/dist
# Visual Studio # Visual Studio
.vs/ .vs/
UpgradeLog*.htm

View File

@ -149,16 +149,19 @@ public class ChapterAnalyzer : IMediaFileAnalyzer
continue; continue;
} }
// Check for possibility of overlapping keywords if (!string.IsNullOrWhiteSpace(next.Name))
var overlap = Regex.IsMatch(
next.Name,
expression,
RegexOptions.None,
TimeSpan.FromSeconds(1));
if (overlap)
{ {
continue; // Check for possibility of overlapping keywords
var overlap = Regex.IsMatch(
next.Name,
expression,
RegexOptions.None,
TimeSpan.FromSeconds(1));
if (overlap)
{
continue;
}
} }
matchingChapter = new(episode.EpisodeId, currentRange); matchingChapter = new(episode.EpisodeId, currentRange);