|
|
@ -2,8 +2,14 @@
|
|
|
|
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
|
|
|
|
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
|
|
|
|
mutators: {
|
|
|
|
mutators: {
|
|
|
|
seriesYear: function () {
|
|
|
|
seriesYear: function () {
|
|
|
|
var date = Date.utc.create(this.get('firstAired'));
|
|
|
|
var date = Date.utc.create(this.get('firstAired')).format('({yyyy})');
|
|
|
|
return date.format('{yyyy}');
|
|
|
|
|
|
|
|
|
|
|
|
//don't append year, if the series name already has the name appended.
|
|
|
|
|
|
|
|
if (this.get('seriesName').endsWith(date)) {
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return date;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|