1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Fix: Fixed an issue with the year automatically being added to new series when added to NzbDrone.

This commit is contained in:
Mark McDowall 2012-02-29 00:09:53 -08:00
parent 6375df058e
commit dc4e45f72d
3 changed files with 4 additions and 2 deletions

View File

@ -177,7 +177,8 @@ public JsonResult LookupSeries(string term)
var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel
{ {
Id = r.Id, 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) ?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
:r.SeriesName, :r.SeriesName,
Banner = r.Banner.BannerPath Banner = r.Banner.BannerPath

View File

@ -7,5 +7,6 @@ public class TvDbSearchResultModel
public int Id { get; set; } public int Id { get; set; }
public string Title { get; set; } public string Title { get; set; }
public string Banner { get; set; } public string Banner { get; set; }
public string DisplayedTitle { get; set; }
} }
} }

View File

@ -65,7 +65,7 @@ function bindSeriesAutoComplete(selector) {
.data("autocomplete")._renderItem = function (ul, item) { .data("autocomplete")._renderItem = function (ul, item) {
return $("<li></li>") return $("<li></li>")
.data("item.autocomplete", item) .data("item.autocomplete", item)
.append("<a><div class=seriesLookupTitle>" + item.Title + "</div></a>") .append("<a><div class=seriesLookupTitle>" + item.DisplayedTitle + "</div></a>")
.appendTo(ul); .appendTo(ul);
}; };
}); });