mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 18:42:42 +01:00
Fixed: Don't show an error if filesize cannot be formatted
This commit is contained in:
parent
fbdc84b6cd
commit
14f57d655a
@ -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;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,11 @@ define(
|
||||
|
||||
bytes: function (sourceSize) {
|
||||
var size = Number(sourceSize);
|
||||
|
||||
if (isNaN(size)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return Filesize(size, { base: 2, round: 1 });
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user