From 1d0f18e8f149b9bc502a6ca68fb038add63eb4fb Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 7 Aug 2013 00:04:34 -0700 Subject: [PATCH] Added size to episode downloaded tooltip --- UI/Cells/EpisodeStatusCell.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/UI/Cells/EpisodeStatusCell.js b/UI/Cells/EpisodeStatusCell.js index 0fad9247c..b397abd25 100644 --- a/UI/Cells/EpisodeStatusCell.js +++ b/UI/Cells/EpisodeStatusCell.js @@ -3,8 +3,9 @@ define( [ 'backgrid', - 'moment' - ], function (Backgrid, Moment) { + 'moment', + 'Shared/FormatHelpers' + ], function (Backgrid, Moment, FormatHelpers) { return Backgrid.Cell.extend({ className: 'episode-status-cell', @@ -21,14 +22,19 @@ define( var hasFile = this.model.get('hasFile'); if (hasFile) { - var quality = this.model.get('episodeFile').quality; + var episodeFile = this.model.get('episodeFile'); + var quality = episodeFile.quality; + var size = FormatHelpers.bytes(episodeFile.size); + var title = 'Episode downloaded'; if (quality.proper) { - this.$el.html('{0}'.format(quality.quality.name)); + title += ' [PROPER] - {0}'.format(size); + this.$el.html('{1}'.format(title, quality.quality.name)); } else { - this.$el.html('{0}'.format(quality.quality.name)); + title += ' - {0}'.format(size); + this.$el.html('{1}'.format(title, quality.quality.name)); } return this;