Don't run chapter analyzer with an empty regex

This commit is contained in:
ConfusedPolarBear 2022-11-29 20:31:41 -06:00
parent 0afc4cab41
commit 4bb978639c

View File

@ -38,6 +38,11 @@ public class ChapterAnalyzer : IMediaFileAnalyzer
Plugin.Instance!.Configuration.ChapterAnalyzerIntroductionPattern :
Plugin.Instance!.Configuration.ChapterAnalyzerEndCreditsPattern;
if (string.IsNullOrWhiteSpace(expression))
{
return analysisQueue;
}
foreach (var episode in analysisQueue)
{
if (cancellationToken.IsCancellationRequested)