mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-10 04:52:42 +01:00
fixed where year could show up twice in series search.
This commit is contained in:
parent
b393c11b27
commit
bf50c5989a
@ -1,5 +1,5 @@
|
||||
<div class="result-item row">
|
||||
<div>
|
||||
<a href="http://thetvdb.com/?tab=series&id={{id}}" target="_blank" class="icon-info-sign"></a>{{seriesName}} ({{seriesYear}})
|
||||
<a href="http://thetvdb.com/?tab=series&id={{id}}" target="_blank" class="icon-info-sign"></a>{{seriesName}} {{seriesYear}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,8 +2,14 @@
|
||||
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
|
||||
mutators: {
|
||||
seriesYear: function () {
|
||||
var date = Date.utc.create(this.get('firstAired'));
|
||||
return date.format('{yyyy}');
|
||||
var date = Date.utc.create(this.get('firstAired')).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;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user