1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-28 23:07:13 -04:00

Remove trailing whitespace

This commit is contained in:
ta264
2019-12-22 21:24:11 +00:00
committed by Qstick
parent 8d27111f7b
commit d4fa9b7345
273 changed files with 566 additions and 555 deletions
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.MetadataSource
public SearchMovieComparer(string searchQuery)
{
SearchQuery = searchQuery;
var match = Regex.Match(SearchQuery, @"^(?<query>.+)\s+(?:\((?<year>\d{4})\)|(?<year>\d{4}))$");
if (match.Success)
{
@@ -56,10 +56,10 @@ namespace NzbDrone.Core.MetadataSource
// Compare prefix matches by year "(CSI: ..."
result = CompareWithYear(x, y, s => s.Title.ToLowerInvariant().StartsWith(_searchQueryWithoutYear + ":"));
if (result != 0) return -result;
return Compare(x, y, s => SearchQuery.LevenshteinDistanceClean(s.Title) - GetYearFactor(s));
}
public int Compare<T>(Movie x, Movie y, Func<Movie, T> keySelector)
where T : IComparable<T>
{