mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Fixed: Search results from trakt are now sorted based on similarity with the search query.
Using a Levenshtein distance algorithm.
This commit is contained in:
@@ -35,7 +35,9 @@ namespace NzbDrone.Core.MetadataSource
|
||||
var restRequest = new RestRequest(GetSearchTerm(title) + "/30/seasons");
|
||||
var response = client.ExecuteAndValidate<List<Show>>(restRequest);
|
||||
|
||||
return response.Select(MapSeries).ToList();
|
||||
return response.Select(MapSeries)
|
||||
.OrderBy(v => title.LevenshteinDistanceClean(v.Title))
|
||||
.ToList();
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user