Update files

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2025-09-23 08:14:05 +07:00
parent 9727680c57
commit 96eb8c5f51
2 changed files with 14 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ class EpisodeRenamer
{
private class PatternConfig
{
public bool Enabled { get; set; }
public string Regex { get; set; }
public int? Start { get; set; }
public int? End { get; set; }
@@ -109,13 +110,15 @@ class EpisodeRenamer
patterns = new List<Pattern>();
foreach (PatternConfig patternConfig in config.Patterns)
{
if (!patternConfig.Enabled)
continue;
RegexOptions options = patternConfig.IgnoreCase ? RegexOptions.IgnoreCase : RegexOptions.None;
Regex regex = new Regex(patternConfig.Regex, options);
patterns.Add(new Pattern(regex, patternConfig.Start, patternConfig.End));
}
Console.WriteLine("Конфигурация успешно загружена.");
Console.WriteLine($"Загружено {patterns.Count} паттернов и {extensions.Count} расширений.");
Console.WriteLine($"Загружено паттернов: {patterns.Count}; расширений: {extensions.Count}.");
}
private static void ProcessFolder(string folder)