mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Newznab searching is better
Fixed: Newznab returns better results for multi-word searches
This commit is contained in:
parent
4425da8ad9
commit
f6952abf39
3 changed files with 29 additions and 1 deletions
|
@ -129,5 +129,21 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
var hostname = item.Links[0].Uri.DnsSafeHost.ToLower();
|
||||
return String.Format("{0}_{1}", Name, hostname);
|
||||
}
|
||||
|
||||
public override string GetQueryTitle(string title)
|
||||
{
|
||||
title = RemoveThe.Replace(title, string.Empty);
|
||||
|
||||
//remove any repeating whitespace
|
||||
var cleanTitle = TitleSearchRegex.Replace(title, "%20");
|
||||
|
||||
cleanTitle = Regex.Replace(cleanTitle, @"(%20){1,100}", "%20");
|
||||
|
||||
//Trim %20 from start then then the end
|
||||
cleanTitle = Regex.Replace(cleanTitle, "^(%20)", "");
|
||||
cleanTitle = Regex.Replace(cleanTitle, "(%20)$", "");
|
||||
|
||||
return cleanTitle;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue