1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-03 18:25:35 +00:00

#5974: Torrents queued should be able to "Resume Now" (patch by JJTagy)

This commit is contained in:
Mike Gelfand 2016-01-03 20:57:42 +00:00
parent b71ba2819a
commit 5e3c60f565
2 changed files with 7 additions and 2 deletions

View file

@ -259,6 +259,8 @@ Torrent.prototype =
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(); },

View file

@ -216,7 +216,7 @@ Transmission.prototype =
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)
@ -1325,7 +1325,8 @@ Transmission.prototype =
paused: 0,
sel: 0,
activeSel: 0,
pausedSel: 0
pausedSel: 0,
queuedSel: 0
};
clearTimeout(this.buttonRefreshTimer);
@ -1334,12 +1335,14 @@ Transmission.prototype =
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);