From a651dea5a8c7588f7380d296d3b30d022f9f3728 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Jul 2015 14:23:43 -0600 Subject: [PATCH] Strip most non alphanumeric characters from show titles before searching --- src/Jackett/SonarApi.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Jackett/SonarApi.cs b/src/Jackett/SonarApi.cs index 6b33622d4..cf7178c91 100644 --- a/src/Jackett/SonarApi.cs +++ b/src/Jackett/SonarApi.cs @@ -86,7 +86,15 @@ namespace Jackett string SanitizeTitle(string title) { - return title.Replace("(", "").Replace(")", ""); + char[] arr = title.ToCharArray(); + + arr = Array.FindAll(arr, c => (char.IsLetterOrDigit(c) + || char.IsWhiteSpace(c) + || c == '-' + || c == '.' + )); + title = new string(arr); + return title; } void LoadSettings()