Calendar and series details show download progress

This commit is contained in:
Mark McDowall
2014-01-31 17:47:59 -08:00
parent c84bd6f21f
commit d80d89e687
7 changed files with 80 additions and 34 deletions
+9 -1
View File
@@ -57,7 +57,15 @@ define(
var model = this.model;
var downloading = QueueCollection.findEpisode(model.get('id'));
if (downloading || this.model.get('downloading')) {
if (downloading) {
var progress = 100 - (downloading.get('sizeleft') / downloading.get('size') * 100);
this.$el.html('<div class="progress progress-purple" title="Episode is downloading - {0}%" data-container="body">'.format(progress.toFixed(1)) +
'<div class="bar" style="width: {0}%;"></div></div>'.format(progress));
return;
}
else if (this.model.get('downloading')) {
icon = 'icon-nd-downloading';
tooltip = 'Episode is downloading';
}