@ -177,7 +177,8 @@ namespace NzbDrone.Web.Controllers
var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel
{
Id = r.Id,
Title = r.FirstAired.Year > 1900
Title = r.SeriesName,
DisplayedTitle = r.FirstAired.Year > 1900 && !r.SeriesName.EndsWith("(" + r.FirstAired.Year + ")")
?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
:r.SeriesName,
Banner = r.Banner.BannerPath
@ -7,5 +7,6 @@ namespace NzbDrone.Web.Models
public int Id { get; set; }
public string Title { get; set; }
public string Banner { get; set; }
public string DisplayedTitle { get; set; }
}
@ -65,7 +65,7 @@ function bindSeriesAutoComplete(selector) {
.data("autocomplete")._renderItem = function (ul, item) {
return $("<li></li>")
.data("item.autocomplete", item)
.append("<a><div class=seriesLookupTitle>" + item.Title + "</div></a>")
.append("<a><div class=seriesLookupTitle>" + item.DisplayedTitle + "</div></a>")
.appendTo(ul);
};
});