mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Fixed: Fixed issue where NzbMatrix servers would die if series title started with 'the'
This commit is contained in:
parent
24dae1927f
commit
2303a02a06
3 changed files with 11 additions and 5 deletions
|
@ -19,6 +19,7 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
protected readonly ConfigProvider _configProvider;
|
||||
|
||||
private static readonly Regex TitleSearchRegex = new Regex(@"[\W]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
protected static readonly Regex RemoveThe = new Regex(@"^the\s", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
[Inject]
|
||||
protected IndexerBase(HttpProvider httpProvider, ConfigProvider configProvider)
|
||||
|
@ -230,6 +231,8 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
/// <returns></returns>
|
||||
public virtual string GetQueryTitle(string title)
|
||||
{
|
||||
title = RemoveThe.Replace(title, string.Empty);
|
||||
|
||||
var cleanTitle = TitleSearchRegex.Replace(title, "+").Trim('+', ' ');
|
||||
|
||||
//remove any repeating +s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue