diff --git a/UI/AddSeries/SearchResultViewTemplate.html b/UI/AddSeries/SearchResultViewTemplate.html index 27d7dcd0e..574422b17 100644 --- a/UI/AddSeries/SearchResultViewTemplate.html +++ b/UI/AddSeries/SearchResultViewTemplate.html @@ -8,7 +8,7 @@
-

{{title}}

+

{{titleWithYear}}

{{overview}} diff --git a/UI/Handlebars/Helpers/Series.js b/UI/Handlebars/Helpers/Series.js index ac2a21747..f9d849325 100644 --- a/UI/Handlebars/Helpers/Series.js +++ b/UI/Handlebars/Helpers/Series.js @@ -62,4 +62,12 @@ define( return new Handlebars.SafeString('{0} Seasons'.format(seasonCount)) }); + + Handlebars.registerHelper('titleWithYear', function () { + if (this.title.endsWith(' ({0})'.format(this.year))) { + return this.title; + } + + return '{0} ({1})'.format(this.title, this.year); + }); });