mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Priority actions should work only if the tab is displayed
This commit is contained in:
parent
26c69fe6d4
commit
b2f98bd059
2 changed files with 12 additions and 2 deletions
|
@ -500,6 +500,16 @@ void HttpConnection::respondCommand(QString command)
|
||||||
if(h.is_valid()) h.queue_position_down();
|
if(h.is_valid()) h.queue_position_down();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(command == "topPrio") {
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(parser.post("hash"));
|
||||||
|
if(h.is_valid()) h.queue_position_top();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(command == "bottomPrio") {
|
||||||
|
QTorrentHandle h = BTSession->getTorrentHandle(parser.post("hash"));
|
||||||
|
if(h.is_valid()) h.queue_position_bottom();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(command == "recheck"){
|
if(command == "recheck"){
|
||||||
recheckTorrent(parser.post("hash"));
|
recheckTorrent(parser.post("hash"));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -742,8 +742,8 @@ void TransferListWidget::decreasePrioSelectedTorrents() {
|
||||||
refreshList();
|
refreshList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Should work only if the tab is displayed
|
|
||||||
void TransferListWidget::topPrioSelectedTorrents() {
|
void TransferListWidget::topPrioSelectedTorrents() {
|
||||||
|
if(main_window->getCurrentTabWidget() != this) return;
|
||||||
const QStringList hashes = getSelectedTorrentsHashes();
|
const QStringList hashes = getSelectedTorrentsHashes();
|
||||||
foreach(const QString &hash, hashes) {
|
foreach(const QString &hash, hashes) {
|
||||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
@ -754,8 +754,8 @@ void TransferListWidget::topPrioSelectedTorrents() {
|
||||||
refreshList();
|
refreshList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Should work only if the tab is displayed
|
|
||||||
void TransferListWidget::bottomPrioSelectedTorrents() {
|
void TransferListWidget::bottomPrioSelectedTorrents() {
|
||||||
|
if(main_window->getCurrentTabWidget() != this) return;
|
||||||
const QStringList hashes = getSelectedTorrentsHashes();
|
const QStringList hashes = getSelectedTorrentsHashes();
|
||||||
foreach(const QString &hash, hashes) {
|
foreach(const QString &hash, hashes) {
|
||||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue