1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-06 02:52:41 +01:00

Fixed: Don't show an error if filesize cannot be formatted

This commit is contained in:
Mark McDowall 2014-06-13 08:28:52 -07:00
parent fbdc84b6cd
commit 14f57d655a
2 changed files with 9 additions and 4 deletions

View File

@ -50,15 +50,15 @@ define(
var title = 'Episode downloaded';
if (quality.proper) {
title += ' [PROPER] - {0}'.format(size);
this.$el.html('<span class="badge badge-info" title="{0}">{1}</span>'.format(title, quality.quality.name));
title += ' [PROPER]';
}
else {
if (size !== '') {
title += ' - {0}'.format(size);
this.$el.html('<span class="badge badge-inverse" title="{0}">{1}</span>'.format(title, quality.quality.name));
}
this.$el.html('<span class="badge badge-inverse" title="{0}">{1}</span>'.format(title, quality.quality.name));
return;
}

View File

@ -10,6 +10,11 @@ define(
bytes: function (sourceSize) {
var size = Number(sourceSize);
if (isNaN(size)) {
return '';
}
return Filesize(size, { base: 2, round: 1 });
},