Added size to episode downloaded tooltip

pull/3113/head
Mark McDowall 11 years ago
parent 86fa34628f
commit 1d0f18e8f1

@ -3,8 +3,9 @@
define( define(
[ [
'backgrid', 'backgrid',
'moment' 'moment',
], function (Backgrid, Moment) { 'Shared/FormatHelpers'
], function (Backgrid, Moment, FormatHelpers) {
return Backgrid.Cell.extend({ return Backgrid.Cell.extend({
className: 'episode-status-cell', className: 'episode-status-cell',
@ -21,14 +22,19 @@ define(
var hasFile = this.model.get('hasFile'); var hasFile = this.model.get('hasFile');
if (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) { if (quality.proper) {
this.$el.html('<span class="badge badge-info" title="Episode downloaded [PROPER]">{0}</span>'.format(quality.quality.name)); title += ' [PROPER] - {0}'.format(size);
this.$el.html('<span class="badge badge-info" title="{0}">{1}</span>'.format(title, quality.quality.name));
} }
else { else {
this.$el.html('<span class="badge badge-inverse" title="Episode downloaded">{0}</span>'.format(quality.quality.name)); title += ' - {0}'.format(size);
this.$el.html('<span class="badge badge-inverse" title="{0}">{1}</span>'.format(title, quality.quality.name));
} }
return this; return this;

Loading…
Cancel
Save