isStopped: function() { return this.getStatus() === Torrent._StatusStopped; },
isChecking: function() { return this.getStatus() === Torrent._StatusCheck; },
isDownloading: function() { return this.getStatus() === Torrent._StatusDownload; },
+ isQueued: function() { return this.getStatus() === Torrent._StatusDownloadWait ||
+ this.getStatus() === Torrent._StatusSeedWait; },
isDone: function() { return this.getLeftUntilDone() < 1; },
needsMetaData: function(){ return this.getMetadataPercentComplete() < 1; },
getActivity: function() { return this.getDownloadSpeed() + this.getUploadSpeed(); },
var tl = $(event.target);
tl.contextmenu("enableEntry", "pause_selected", s.activeSel > 0);
tl.contextmenu("enableEntry", "resume_selected", s.pausedSel > 0);
- tl.contextmenu("enableEntry", "resume_now_selected", s.pausedSel > 0);
+ tl.contextmenu("enableEntry", "resume_now_selected", s.pausedSel > 0 || s.queuedSel > 0);
tl.contextmenu("enableEntry", "rename", s.sel == 1);
});
}, this)
paused: 0,
sel: 0,
activeSel: 0,
- pausedSel: 0
+ pausedSel: 0,
+ queuedSel: 0
};
clearTimeout(this.buttonRefreshTimer);
for (var i=0, row; row=this._rows[i]; ++i) {
var isStopped = row.getTorrent().isStopped();
var isSelected = row.isSelected();
+ var isQueued = row.getTorrent().isQueued();
++stats.total;
if (!isStopped) ++stats.active;
if (isStopped) ++stats.paused;
if (isSelected) ++stats.sel;
if (isSelected && !isStopped) ++stats.activeSel;
if (isSelected && isStopped) ++stats.pausedSel;
+ if (isSelected && isQueued) ++stats.queuedSel;
}
callback(stats);