audiobookbay: clean titles (#14025)

This commit is contained in:
Bogdan
2023-02-15 13:04:24 +02:00
committed by GitHub
parent fc79f23d32
commit 41e56f1f30

View File

@@ -256,7 +256,7 @@ namespace Jackett.Common.Indexers
Guid = details,
Details = details,
Link = details,
Title = title,
Title = CleanTitle(title),
Category = categories,
Size = size,
Seeders = 1,
@@ -292,5 +292,13 @@ namespace Jackett.Common.Indexers
return dom;
}
private static string CleanTitle(string title)
{
title = Regex.Replace(title, @"[\u0000-\u0008\u000A-\u001F\u0100-\uFFFF]", string.Empty, RegexOptions.Compiled);
title = Regex.Replace(title, @"\s+", " ", RegexOptions.Compiled | RegexOptions.IgnoreCase);
return title.Trim();
}
}
}