From ab578566bec27e6509c22d9c37fa0dadd739cee5 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 25 Jun 2022 23:23:13 -0700 Subject: [PATCH] Log replacement regex --- src/NzbDrone.Core/Parser/Parser.cs | 1 + src/NzbDrone.Core/Parser/RegexReplace.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 8c9747876..c80b6802e 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -561,6 +561,7 @@ public static ParsedEpisodeInfo ParseTitle(string title) { if (replace.TryReplace(ref releaseTitle)) { + Logger.Trace($"Replace regex: {replace}"); Logger.Debug("Substituted with " + releaseTitle); } } diff --git a/src/NzbDrone.Core/Parser/RegexReplace.cs b/src/NzbDrone.Core/Parser/RegexReplace.cs index 0dc1bd0f6..ee9c5ba82 100644 --- a/src/NzbDrone.Core/Parser/RegexReplace.cs +++ b/src/NzbDrone.Core/Parser/RegexReplace.cs @@ -42,5 +42,10 @@ public bool TryReplace(ref string input) input = _regex.Replace(input, _replacementFormat); return result; } + + public override string ToString() + { + return _regex.ToString(); + } } }