New: Absolute episode numbers shown beside episode numbers

This commit is contained in:
Mark McDowall
2014-08-23 00:07:44 -07:00
parent bc727e7187
commit 367ab6a361
4 changed files with 26 additions and 2 deletions
+9 -2
View File
@@ -4,8 +4,9 @@ define(
[
'marionette',
'Cells/NzbDroneCell',
'reqres'
], function (Marionette, NzbDroneCell, reqres) {
'reqres',
'Series/SeriesCollection'
], function (Marionette, NzbDroneCell, reqres, SeriesCollection) {
return NzbDroneCell.extend({
className: 'episode-number-cell',
@@ -16,6 +17,12 @@ define(
this.$el.empty();
this.$el.html(this.model.get('episodeNumber'));
var series = SeriesCollection.get(this.model.get('seriesId'));
if (series.get('seriesType') === 'anime' && this.model.has('absoluteEpisodeNumber')) {
this.$el.html('{0} ({1})'.format(this.model.get('episodeNumber'), this.model.get('absoluteEpisodeNumber')));
}
var alternateTitles = [];
if (reqres.hasHandler(reqres.Requests.GetAlternateNameBySeasonNumber)) {