mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-10 15:23:40 -07:00
Add GetBestMatch to TvDbProvider (Provides a way to get the best result from a list of results)
Default value for Quality Dropbox in AddExisting is now the default value from Settings.
This commit is contained in:
parent
148fd044ef
commit
460e48d6a1
8 changed files with 33 additions and 697 deletions
|
@ -80,12 +80,14 @@ namespace NzbDrone.Web.Controllers
|
|||
ViewData["path"] = path;
|
||||
ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^');
|
||||
|
||||
var defaultQuality = _configProvider.DefaultQualityProfile;
|
||||
var qualityProfiles = _qualityProvider.GetAllProfiles();
|
||||
|
||||
ViewData["quality"] = new SelectList(
|
||||
qualityProfiles,
|
||||
"QualityProfileId",
|
||||
"Name",
|
||||
"HD");
|
||||
defaultQuality); ;
|
||||
|
||||
return PartialView("AddSeriesItem", suggestions);
|
||||
|
||||
|
@ -117,8 +119,9 @@ namespace NzbDrone.Web.Controllers
|
|||
public SelectList GetSuggestionList(string searchString)
|
||||
{
|
||||
var dataVal = _tvDbProvider.SearchSeries(searchString);
|
||||
var bestResult = _tvDbProvider.GetBestMatch(dataVal.ToList(), searchString);
|
||||
|
||||
return new SelectList(dataVal, "Id", "SeriesName");
|
||||
return new SelectList(dataVal, "Id", "SeriesName", bestResult);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue