Use Start/Stop instead of Resume/Pause

PR #20532.

---------

Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
This commit is contained in:
thalieht
2024-03-25 18:11:04 +02:00
committed by GitHub
parent f2d6129db3
commit 5d1c249606
70 changed files with 413 additions and 391 deletions

View File

@@ -139,7 +139,7 @@ void AppController::preferencesAction()
// When adding a torrent
data[u"torrent_content_layout"_s] = Utils::String::fromEnum(session->torrentContentLayout());
data[u"add_to_top_of_queue"_s] = session->isAddTorrentToQueueTop();
data[u"start_paused_enabled"_s] = session->isAddTorrentPaused();
data[u"add_stopped_enabled"_s] = session->isAddTorrentStopped();
data[u"torrent_stop_condition"_s] = Utils::String::fromEnum(session->torrentStopCondition());
data[u"merge_trackers"_s] = session->isMergeTrackersEnabled();
data[u"auto_delete_mode"_s] = static_cast<int>(TorrentFileGuard::autoDeleteMode());
@@ -524,8 +524,8 @@ void AppController::setPreferencesAction()
session->setTorrentContentLayout(Utils::String::toEnum(it.value().toString(), BitTorrent::TorrentContentLayout::Original));
if (hasKey(u"add_to_top_of_queue"_s))
session->setAddTorrentToQueueTop(it.value().toBool());
if (hasKey(u"start_paused_enabled"_s))
session->setAddTorrentPaused(it.value().toBool());
if (hasKey(u"add_stopped_enabled"_s))
session->setAddTorrentStopped(it.value().toBool());
if (hasKey(u"torrent_stop_condition"_s))
session->setTorrentStopCondition(Utils::String::toEnum(it.value().toString(), BitTorrent::Torrent::StopCondition::None));
if (hasKey(u"merge_trackers"_s))

View File

@@ -51,10 +51,10 @@ namespace
return u"missingFiles"_s;
case BitTorrent::TorrentState::Uploading:
return u"uploading"_s;
case BitTorrent::TorrentState::PausedUploading:
return u"pausedUP"_s;
case BitTorrent::TorrentState::StoppedUploading:
return u"stoppedUP"_s;
case BitTorrent::TorrentState::QueuedUploading:
return u"queuedUP"_s;
return u"stoppedUP"_s;
case BitTorrent::TorrentState::StalledUploading:
return u"stalledUP"_s;
case BitTorrent::TorrentState::CheckingUploading:
@@ -67,8 +67,8 @@ namespace
return u"metaDL"_s;
case BitTorrent::TorrentState::ForcedDownloadingMetadata:
return u"forcedMetaDL"_s;
case BitTorrent::TorrentState::PausedDownloading:
return u"pausedDL"_s;
case BitTorrent::TorrentState::StoppedDownloading:
return u"stoppedDL"_s;
case BitTorrent::TorrentState::QueuedDownloading:
return u"queuedDL"_s;
case BitTorrent::TorrentState::StalledDownloading:

View File

@@ -474,8 +474,8 @@ void SyncController::maindataAction()
connect(btSession, &BitTorrent::Session::torrentAboutToBeRemoved, this, &SyncController::onTorrentAboutToBeRemoved);
connect(btSession, &BitTorrent::Session::torrentCategoryChanged, this, &SyncController::onTorrentCategoryChanged);
connect(btSession, &BitTorrent::Session::torrentMetadataReceived, this, &SyncController::onTorrentMetadataReceived);
connect(btSession, &BitTorrent::Session::torrentPaused, this, &SyncController::onTorrentPaused);
connect(btSession, &BitTorrent::Session::torrentResumed, this, &SyncController::onTorrentResumed);
connect(btSession, &BitTorrent::Session::torrentStopped, this, &SyncController::onTorrentStopped);
connect(btSession, &BitTorrent::Session::torrentStarted, this, &SyncController::onTorrentStarted);
connect(btSession, &BitTorrent::Session::torrentSavePathChanged, this, &SyncController::onTorrentSavePathChanged);
connect(btSession, &BitTorrent::Session::torrentSavingModeChanged, this, &SyncController::onTorrentSavingModeChanged);
connect(btSession, &BitTorrent::Session::torrentTagAdded, this, &SyncController::onTorrentTagAdded);
@@ -882,12 +882,12 @@ void SyncController::onTorrentMetadataReceived(BitTorrent::Torrent *torrent)
m_updatedTorrents.insert(torrent->id());
}
void SyncController::onTorrentPaused(BitTorrent::Torrent *torrent)
void SyncController::onTorrentStopped(BitTorrent::Torrent *torrent)
{
m_updatedTorrents.insert(torrent->id());
}
void SyncController::onTorrentResumed(BitTorrent::Torrent *torrent)
void SyncController::onTorrentStarted(BitTorrent::Torrent *torrent)
{
m_updatedTorrents.insert(torrent->id());
}

View File

@@ -71,8 +71,8 @@ private:
void onTorrentAboutToBeRemoved(BitTorrent::Torrent *torrent);
void onTorrentCategoryChanged(BitTorrent::Torrent *torrent, const QString &oldCategory);
void onTorrentMetadataReceived(BitTorrent::Torrent *torrent);
void onTorrentPaused(BitTorrent::Torrent *torrent);
void onTorrentResumed(BitTorrent::Torrent *torrent);
void onTorrentStopped(BitTorrent::Torrent *torrent);
void onTorrentStarted(BitTorrent::Torrent *torrent);
void onTorrentSavePathChanged(BitTorrent::Torrent *torrent);
void onTorrentSavingModeChanged(BitTorrent::Torrent *torrent);
void onTorrentTagAdded(BitTorrent::Torrent *torrent, const Tag &tag);

View File

@@ -276,7 +276,7 @@ void TorrentsController::countAction()
// - "force_start": Torrent force start state
// - "category": Torrent category
// GET params:
// - filter (string): all, downloading, seeding, completed, paused, resumed, active, inactive, stalled, stalled_uploading, stalled_downloading
// - filter (string): all, downloading, seeding, completed, stopped, running, active, inactive, stalled, stalled_uploading, stalled_downloading
// - category (string): torrent category for filtering by it (empty string means "uncategorized"; no "category" param presented means "any category")
// - tag (string): torrent tag for filtering by it (empty string means "untagged"; no "tag" param presented means "any tag")
// - hashes (string): filter by hashes, can contain multiple hashes separated by |
@@ -685,7 +685,7 @@ void TorrentsController::addAction()
const bool seqDownload = parseBool(params()[u"sequentialDownload"_s]).value_or(false);
const bool firstLastPiece = parseBool(params()[u"firstLastPiecePrio"_s]).value_or(false);
const std::optional<bool> addToQueueTop = parseBool(params()[u"addToTopOfQueue"_s]);
const std::optional<bool> addPaused = parseBool(params()[u"paused"_s]);
const std::optional<bool> addStopped = parseBool(params()[u"stopped"_s]);
const QString savepath = params()[u"savepath"_s].trimmed();
const QString downloadPath = params()[u"downloadPath"_s].trimmed();
const std::optional<bool> useDownloadPath = parseBool(params()[u"useDownloadPath"_s]);
@@ -740,7 +740,7 @@ void TorrentsController::addAction()
.firstLastPiecePriority = firstLastPiece,
.addForced = false,
.addToQueueTop = addToQueueTop,
.addPaused = addPaused,
.addStopped = addStopped,
.stopCondition = stopCondition,
.filePaths = {},
.filePriorities = {},
@@ -841,7 +841,7 @@ void TorrentsController::editTrackerAction()
torrent->replaceTrackers(trackers);
if (!torrent->isPaused())
if (!torrent->isStopped())
torrent->forceReannounce();
}
@@ -857,7 +857,7 @@ void TorrentsController::removeTrackersAction()
const QStringList urls = params()[u"urls"_s].split(u'|');
torrent->removeTrackers(urls);
if (!torrent->isPaused())
if (!torrent->isStopped())
torrent->forceReannounce();
}
@@ -899,20 +899,20 @@ void TorrentsController::addPeersAction()
setResult(results);
}
void TorrentsController::pauseAction()
void TorrentsController::stopAction()
{
requireParams({u"hashes"_s});
const QStringList hashes = params()[u"hashes"_s].split(u'|');
applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent) { torrent->pause(); });
applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent) { torrent->stop(); });
}
void TorrentsController::resumeAction()
void TorrentsController::startAction()
{
requireParams({u"hashes"_s});
const QStringList idStrings = params()[u"hashes"_s].split(u'|');
applyToTorrents(idStrings, [](BitTorrent::Torrent *const torrent) { torrent->resume(); });
applyToTorrents(idStrings, [](BitTorrent::Torrent *const torrent) { torrent->start(); });
}
void TorrentsController::filePrioAction()
@@ -1066,7 +1066,7 @@ void TorrentsController::setForceStartAction()
const QStringList hashes {params()[u"hashes"_s].split(u'|')};
applyToTorrents(hashes, [value](BitTorrent::Torrent *const torrent)
{
torrent->resume(value ? BitTorrent::TorrentOperatingMode::Forced : BitTorrent::TorrentOperatingMode::AutoManaged);
torrent->start(value ? BitTorrent::TorrentOperatingMode::Forced : BitTorrent::TorrentOperatingMode::AutoManaged);
});
}

View File

@@ -47,8 +47,8 @@ private slots:
void filesAction();
void pieceHashesAction();
void pieceStatesAction();
void resumeAction();
void pauseAction();
void startAction();
void stopAction();
void recheckAction();
void reannounceAction();
void renameAction();

View File

@@ -54,7 +54,7 @@
#include "base/utils/version.h"
#include "api/isessionmanager.h"
inline const Utils::Version<3, 2> API_VERSION {2, 10, 4};
inline const Utils::Version<3, 2> API_VERSION {2, 11, 0};
class QTimer;
@@ -177,6 +177,7 @@ private:
{{u"torrents"_s, u"addPeers"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"addTags"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"addTrackers"_s}, Http::METHOD_POST},
{{u"transfer"_s, u"banPeers"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"bottomPrio"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"createCategory"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"createTags"_s}, Http::METHOD_POST},
@@ -187,7 +188,6 @@ private:
{{u"torrents"_s, u"editTracker"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"filePrio"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"increasePrio"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"pause"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"reannounce"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"recheck"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"removeCategories"_s}, Http::METHOD_POST},
@@ -196,7 +196,6 @@ private:
{{u"torrents"_s, u"rename"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"renameFile"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"renameFolder"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"resume"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"setAutoManagement"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"setCategory"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"setDownloadLimit"_s}, Http::METHOD_POST},
@@ -208,14 +207,15 @@ private:
{{u"torrents"_s, u"setSSLParameters"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"setSuperSeeding"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"setUploadLimit"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"toggleFirstLastPiecePrio"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"toggleSequentialDownload"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"topPrio"_s}, Http::METHOD_POST},
{{u"transfer"_s, u"banPeers"_s}, Http::METHOD_POST},
{{u"transfer"_s, u"setDownloadLimit"_s}, Http::METHOD_POST},
{{u"transfer"_s, u"setSpeedLimitsMode"_s}, Http::METHOD_POST},
{{u"transfer"_s, u"setUploadLimit"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"start"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"stop"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"toggleFirstLastPiecePrio"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"toggleSequentialDownload"_s}, Http::METHOD_POST},
{{u"transfer"_s, u"toggleSpeedLimitsMode"_s}, Http::METHOD_POST},
{{u"torrents"_s, u"topPrio"_s}, Http::METHOD_POST},
};
bool m_isAltUIUsed = false;
Path m_rootFolder;

View File

@@ -75,7 +75,7 @@
<label for="startTorrent">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="hidden" id="startTorrentHidden" name="paused" />
<input type="hidden" id="startTorrentHidden" name="stopped" />
<input type="checkbox" id="startTorrent" />
</td>
</tr>

View File

@@ -0,0 +1 @@
<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="#ff8c00" stroke="#ff8c00" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.458" transform="matrix(1.3141898 0 0 1.0646346 -4.824252 -1.566469)"><path d="m8.1321547 5.07899h2.4210093c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.4210093c-.6706196 0-1.2105048-.670233-1.2105048-1.502764v-19.8364877c0-.8325314.5398852-1.5027643 1.2105048-1.5027643z"/><path d="m21.138228 5.07899h2.421009c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.421009c-.67062 0-1.210505-.670233-1.210505-1.502764v-19.8364877c0-.8325314.539885-1.5027643 1.210505-1.5027643z"/></g></svg>

After

Width:  |  Height:  |  Size: 779 B

View File

@@ -0,0 +1 @@
<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="#808080" stroke="#808080" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.458" transform="matrix(1.3141898 0 0 1.0646346 -4.824252 -1.566469)"><path d="m8.1321547 5.07899h2.4210093c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.4210093c-.6706196 0-1.2105048-.670233-1.2105048-1.502764v-19.8364877c0-.8325314.5398852-1.5027643 1.2105048-1.5027643z"/><path d="m21.138228 5.07899h2.421009c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.421009c-.67062 0-1.210505-.670233-1.210505-1.502764v-19.8364877c0-.8325314.539885-1.5027643 1.210505-1.5027643z"/></g></svg>

After

Width:  |  Height:  |  Size: 779 B

View File

@@ -1 +1 @@
<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="#808080" stroke="#808080" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.458" transform="matrix(1.3141898 0 0 1.0646346 -4.824252 -1.566469)"><path d="m8.1321547 5.07899h2.4210093c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.4210093c-.6706196 0-1.2105048-.670233-1.2105048-1.502764v-19.8364877c0-.8325314.5398852-1.5027643 1.2105048-1.5027643z"/><path d="m21.138228 5.07899h2.421009c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.421009c-.67062 0-1.210505-.670233-1.210505-1.502764v-19.8364877c0-.8325314.539885-1.5027643 1.210505-1.5027643z"/></g></svg>
<svg fill="#808080" height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><path d="m2 25.824272c0 2.62569 1.5123781 4.175729 4.0487613 4.175729h19.9024767c2.536384 0 4.048762-1.550039 4.048762-4.175729v-19.6485431c0-2.6256897-1.512378-4.1757289-4.048762-4.1757289h-19.9024767c-2.5363832 0-4.0487613 1.5500392-4.0487613 4.1757289zm0 0" stroke-width="1.47623"/></svg>

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 389 B

View File

@@ -1 +1 @@
<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="#ff8c00" stroke="#ff8c00" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.458" transform="matrix(1.3141898 0 0 1.0646346 -4.824252 -1.566469)"><path d="m8.1321547 5.07899h2.4210093c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.4210093c-.6706196 0-1.2105048-.670233-1.2105048-1.502764v-19.8364877c0-.8325314.5398852-1.5027643 1.2105048-1.5027643z"/><path d="m21.138228 5.07899h2.421009c.67062 0 1.210505.6702329 1.210505 1.5027643v19.8364877c0 .832531-.539885 1.502764-1.210505 1.502764h-2.421009c-.67062 0-1.210505-.670233-1.210505-1.502764v-19.8364877c0-.8325314.539885-1.5027643 1.210505-1.5027643z"/></g></svg>
<svg fill="#ff8c00" height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><path d="m2 25.824272c0 2.62569 1.5123781 4.175729 4.0487613 4.175729h19.9024767c2.536384 0 4.048762-1.550039 4.048762-4.175729v-19.6485431c0-2.6256897-1.512378-4.1757289-4.048762-4.1757289h-19.9024767c-2.5363832 0-4.0487613 1.5500392-4.0487613 4.1757289zm0 0" stroke-width="1.47623"/></svg>

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 389 B

View File

@@ -64,10 +64,10 @@
<li>
<a class="returnFalse">QBT_TR(Edit)QBT_TR[CONTEXT=MainWindow]</a>
<ul>
<li><a id="resumeLink"><img class="MyMenuIcon" alt="QBT_TR(Resume)QBT_TR[CONTEXT=MainWindow]" src="images/torrent-start.svg" width="16" height="16" />QBT_TR(Resume)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="pauseLink"><img class="MyMenuIcon" src="images/torrent-stop.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Pause)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="resumeAllLink"><img class="MyMenuIcon" alt="QBT_TR(Resume All)QBT_TR[CONTEXT=MainWindow]" src="images/torrent-start.svg" width="16" height="16" />QBT_TR(Resume All)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="pauseAllLink"><img class="MyMenuIcon" alt="QBT_TR(Pause All)QBT_TR[CONTEXT=MainWindow]" src="images/torrent-stop.svg" width="16" height="16" />QBT_TR(Pause All)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="startLink"><img class="MyMenuIcon" alt="QBT_TR(Start)QBT_TR[CONTEXT=MainWindow]" src="images/torrent-start.svg" width="16" height="16" />QBT_TR(Start)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="stopLink"><img class="MyMenuIcon" src="images/torrent-stop.svg" alt="QBT_TR(Stop)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Stop)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="startAllLink"><img class="MyMenuIcon" alt="QBT_TR(Start All)QBT_TR[CONTEXT=MainWindow]" src="images/torrent-start.svg" width="16" height="16" />QBT_TR(Start All)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="stopAllLink"><img class="MyMenuIcon" alt="QBT_TR(Stop All)QBT_TR[CONTEXT=MainWindow]" src="images/torrent-stop.svg" width="16" height="16" />QBT_TR(Stop All)QBT_TR[CONTEXT=MainWindow]</a></li>
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="images/list-remove.svg" alt="QBT_TR(Remove)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Remove)QBT_TR[CONTEXT=MainWindow]</a></li>
<li id="topQueuePosItem" class="divider"><a id="topPrioLink"><img class="MyMenuIcon" src="images/go-top.svg" alt="QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow]</a></li>
<li id="increaseQueuePosItem"><a id="increasePrioLink"><img class="MyMenuIcon" src="images/go-up.svg" alt="QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow]</a></li>
@@ -110,8 +110,8 @@
<a id="downloadButton"><img class="mochaToolButton" title="QBT_TR(Add Torrent Link...)QBT_TR[CONTEXT=MainWindow]" src="images/insert-link.svg" alt="QBT_TR(Add Torrent Link...)QBT_TR[CONTEXT=MainWindow]" width="24" height="24" /></a>
<a id="uploadButton"><img class="mochaToolButton" title="QBT_TR(Add Torrent File...)QBT_TR[CONTEXT=MainWindow]" src="images/list-add.svg" alt="QBT_TR(Add Torrent File...)QBT_TR[CONTEXT=MainWindow]" width="24" height="24" /></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Remove)QBT_TR[CONTEXT=TransferListWidget]" src="images/list-remove.svg" alt="QBT_TR(Remove)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24" /></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" src="images/torrent-start.svg" alt="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24" /></a>
<a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" src="images/torrent-stop.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24" /></a>
<a id="startButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Start)QBT_TR[CONTEXT=TransferListWidget]" src="images/torrent-start.svg" alt="QBT_TR(Start)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24" /></a>
<a id="stopButton"><img class="mochaToolButton" title="QBT_TR(Stop)QBT_TR[CONTEXT=TransferListWidget]" src="images/torrent-stop.svg" alt="QBT_TR(Stop)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24" /></a>
<span id="queueingButtons">
<a id="topPrioButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Move to the top of the queue)QBT_TR[CONTEXT=MainWindow]" src="images/go-top.svg" alt="QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow]" width="24" height="24" /></a>
<a id="increasePrioButton"><img class="mochaToolButton" title="QBT_TR(Move up in the queue)QBT_TR[CONTEXT=MainWindow]" src="images/go-up.svg" alt="QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow]" width="24" height="24" /></a>
@@ -139,9 +139,9 @@
</div>
</div>
<ul id="torrentsTableMenu" class="contextMenu">
<li><a href="#start"><img src="images/torrent-start.svg" alt="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#pause"><img src="images/torrent-stop.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#forceStart"><img src="images/torrent-start-forced.svg" alt="QBT_TR(Force Resume)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Force Resume)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#start"><img src="images/torrent-start.svg" alt="QBT_TR(Start)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Start)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#stop"><img src="images/torrent-stop.svg" alt="QBT_TR(Stop)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Stop)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#forceStart"><img src="images/torrent-start-forced.svg" alt="QBT_TR(Force Start)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Force Start)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li class="separator"><a href="#delete"><img src="images/list-remove.svg" alt="QBT_TR(Remove)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Remove)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li class="separator">
<a href="#setLocation"><img src="images/set-location.svg" alt="QBT_TR(Set location...)QBT_TR[CONTEXT=TransferListWidget]" /> QBT_TR(Set location...)QBT_TR[CONTEXT=TransferListWidget]</a>
@@ -201,21 +201,21 @@
<li><a href="#editCategory"><img src="images/edit-rename.svg" alt="QBT_TR(Edit category...)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Edit category...)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li><a href="#deleteCategory"><img src="images/list-remove.svg" alt="QBT_TR(Remove category)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Remove category)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li><a href="#deleteUnusedCategories"><img src="images/list-remove.svg" alt="QBT_TR(Remove unused categories)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Remove unused categories)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li class="separator"><a href="#startTorrentsByCategory"><img src="images/torrent-start.svg" alt="QBT_TR(Resume torrents)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Resume torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li><a href="#pauseTorrentsByCategory"><img src="images/torrent-stop.svg" alt="QBT_TR(Pause torrents)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Pause torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li class="separator"><a href="#startTorrentsByCategory"><img src="images/torrent-start.svg" alt="QBT_TR(Start torrents)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Start torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li><a href="#stopTorrentsByCategory"><img src="images/torrent-stop.svg" alt="QBT_TR(Stop torrents)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Stop torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
<li><a href="#deleteTorrentsByCategory"><img src="images/list-remove.svg" alt="QBT_TR(Remove torrents)QBT_TR[CONTEXT=CategoryFilterWidget]" /> QBT_TR(Remove torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
</ul>
<ul id="tagsFilterMenu" class="contextMenu">
<li><a href="#createTag"><img src="images/list-add.svg" alt="QBT_TR(Add tag...)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Add tag...)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li><a href="#deleteTag"><img src="images/list-remove.svg" alt="QBT_TR(Remove tag)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Remove tag)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li><a href="#deleteUnusedTags"><img src="images/list-remove.svg" alt="QBT_TR(Remove unused tags)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Remove unused tags)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li class="separator"><a href="#startTorrentsByTag"><img src="images/torrent-start.svg" alt="QBT_TR(Resume torrents)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Resume torrents)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li><a href="#pauseTorrentsByTag"><img src="images/torrent-stop.svg" alt="QBT_TR(Pause torrents)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Pause torrents)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li class="separator"><a href="#startTorrentsByTag"><img src="images/torrent-start.svg" alt="QBT_TR(Start torrents)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Start torrents)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li><a href="#stopTorrentsByTag"><img src="images/torrent-stop.svg" alt="QBT_TR(Stop torrents)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Stop torrents)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
<li><a href="#deleteTorrentsByTag"><img src="images/list-remove.svg" alt="QBT_TR(Remove torrents)QBT_TR[CONTEXT=TagFilterWidget]" /> QBT_TR(Remove torrents)QBT_TR[CONTEXT=TagFilterWidget]</a></li>
</ul>
<ul id="trackersFilterMenu" class="contextMenu">
<li><a href="#resumeTorrentsByTracker"><img src="images/torrent-start.svg" alt="QBT_TR(Resume torrents)QBT_TR[CONTEXT=TrackerFiltersList]" /> QBT_TR(Resume torrents)QBT_TR[CONTEXT=TrackerFiltersList]</a></li>
<li><a href="#pauseTorrentsByTracker"><img src="images/torrent-stop.svg" alt="QBT_TR(Pause torrents)QBT_TR[CONTEXT=TrackerFiltersList]" /> QBT_TR(Pause torrents)QBT_TR[CONTEXT=TrackerFiltersList]</a></li>
<li><a href="#startTorrentsByTracker"><img src="images/torrent-start.svg" alt="QBT_TR(Start torrents)QBT_TR[CONTEXT=TrackerFiltersList]" /> QBT_TR(Start torrents)QBT_TR[CONTEXT=TrackerFiltersList]</a></li>
<li><a href="#stopTorrentsByTracker"><img src="images/torrent-stop.svg" alt="QBT_TR(Stop torrents)QBT_TR[CONTEXT=TrackerFiltersList]" /> QBT_TR(Stop torrents)QBT_TR[CONTEXT=TrackerFiltersList]</a></li>
<li><a href="#deleteTorrentsByTracker"><img src="images/list-remove.svg" alt="QBT_TR(Remove torrents)QBT_TR[CONTEXT=TrackerFiltersList]" /> QBT_TR(Remove torrents)QBT_TR[CONTEXT=TrackerFiltersList]</a></li>
</ul>
<ul id="torrentTrackersMenu" class="contextMenu">

View File

@@ -236,8 +236,8 @@ window.addEventListener("DOMContentLoaded", function() {
$("downloading_filter").removeClass("selectedFilter");
$("seeding_filter").removeClass("selectedFilter");
$("completed_filter").removeClass("selectedFilter");
$("paused_filter").removeClass("selectedFilter");
$("resumed_filter").removeClass("selectedFilter");
$("stopped_filter").removeClass("selectedFilter");
$("running_filter").removeClass("selectedFilter");
$("active_filter").removeClass("selectedFilter");
$("inactive_filter").removeClass("selectedFilter");
$("stalled_filter").removeClass("selectedFilter");
@@ -414,8 +414,8 @@ window.addEventListener("DOMContentLoaded", function() {
updateFilter('downloading', 'QBT_TR(Downloading (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('seeding', 'QBT_TR(Seeding (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('completed', 'QBT_TR(Completed (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('resumed', 'QBT_TR(Resumed (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('paused', 'QBT_TR(Paused (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('running', 'QBT_TR(Running (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('stopped', 'QBT_TR(Stopped (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('active', 'QBT_TR(Active (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('inactive', 'QBT_TR(Inactive (%1))QBT_TR[CONTEXT=StatusFilterWidget]');
updateFilter('stalled', 'QBT_TR(Stalled (%1))QBT_TR[CONTEXT=StatusFilterWidget]');

View File

@@ -306,8 +306,8 @@ window.qBittorrent.ContextMenu = (function() {
let all_are_f_l_piece_prio = true;
let there_are_f_l_piece_prio = false;
let all_are_downloaded = true;
let all_are_paused = true;
let there_are_paused = false;
let all_are_stopped = true;
let there_are_stopped = false;
let all_are_force_start = true;
let there_are_force_start = false;
let all_are_super_seeding = true;
@@ -334,10 +334,10 @@ window.qBittorrent.ContextMenu = (function() {
else if (data['super_seeding'] !== true)
all_are_super_seeding = false;
if (data['state'] != 'pausedUP' && data['state'] != 'pausedDL')
all_are_paused = false;
if (data['state'] != 'stoppedUP' && data['state'] != 'stoppedDL')
all_are_stopped = false;
else
there_are_paused = true;
there_are_stopped = true;
if (data['force_start'] !== true)
all_are_force_start = false;
@@ -406,13 +406,13 @@ window.qBittorrent.ContextMenu = (function() {
}
this.showItem('start');
this.showItem('pause');
this.showItem('stop');
this.showItem('forceStart');
if (all_are_paused)
this.hideItem('pause');
if (all_are_stopped)
this.hideItem('stop');
else if (all_are_force_start)
this.hideItem('forceStart');
else if (!there_are_paused && !there_are_force_start)
else if (!there_are_stopped && !there_are_force_start)
this.hideItem('start');
if (!all_are_auto_tmm && there_are_auto_tmm) {

View File

@@ -63,7 +63,7 @@ window.qBittorrent.Download = (function() {
defaultSavePath = pref.save_path;
$('savepath').setProperty('value', defaultSavePath);
$('startTorrent').checked = !pref.start_paused_enabled;
$('startTorrent').checked = !pref.add_stopped_enabled;
$('addToTopOfQueue').checked = pref.add_to_top_of_queue;
if (pref.auto_tmm_enabled == 1) {

View File

@@ -981,11 +981,11 @@ window.qBittorrent.DynamicTable = (function() {
state = "stalledDL";
img_path = "images/stalledDL.svg";
break;
case "pausedDL":
case "stoppedDL":
state = "torrent-stop";
img_path = "images/stopped.svg";
break;
case "pausedUP":
case "stoppedUP":
state = "checked-completed";
img_path = "images/checked-completed.svg";
break;
@@ -1075,10 +1075,10 @@ window.qBittorrent.DynamicTable = (function() {
case "checkingResumeData":
status = "QBT_TR(Checking resume data)QBT_TR[CONTEXT=TransferListDelegate]";
break;
case "pausedDL":
status = "QBT_TR(Paused)QBT_TR[CONTEXT=TransferListDelegate]";
case "stoppedDL":
status = "QBT_TR(Stopped)QBT_TR[CONTEXT=TransferListDelegate]";
break;
case "pausedUP":
case "stoppedUP":
status = "QBT_TR(Completed)QBT_TR[CONTEXT=TransferListDelegate]";
break;
case "moving":
@@ -1338,12 +1338,12 @@ window.qBittorrent.DynamicTable = (function() {
if ((state != 'uploading') && (state.indexOf('UP') === -1))
return false;
break;
case 'paused':
if (state.indexOf('paused') === -1)
case 'stopped':
if (state.indexOf('stopped') === -1)
return false;
break;
case 'resumed':
if (state.indexOf('paused') > -1)
case 'running':
if (state.indexOf('stopped') > -1)
return false;
break;
case 'stalled':
@@ -1509,10 +1509,10 @@ window.qBittorrent.DynamicTable = (function() {
this._this.selectRow(this.rowId);
const row = this._this.rows.get(this.rowId);
const state = row['full_data'].state;
if (state.indexOf('paused') > -1)
if (state.indexOf('stopped') > -1)
startFN();
else
pauseFN();
stopFN();
return true;
});
tr.addClass("torrentsTableContextMenuTarget");

View File

@@ -55,7 +55,7 @@ let globalDownloadLimitFN = function() {};
let StatisticsLinkFN = function() {};
let downloadLimitFN = function() {};
let deleteFN = function() {};
let pauseFN = function() {};
let stopFN = function() {};
let startFN = function() {};
let autoTorrentManagementFN = function() {};
let recheckFN = function() {};
@@ -71,7 +71,7 @@ let editCategoryFN = function() {};
let removeCategoryFN = function() {};
let deleteUnusedCategoriesFN = function() {};
let startTorrentsByCategoryFN = function() {};
let pauseTorrentsByCategoryFN = function() {};
let stopTorrentsByCategoryFN = function() {};
let deleteTorrentsByCategoryFN = function() {};
let torrentAddTagsFN = function() {};
let torrentSetTagsFN = function() {};
@@ -80,10 +80,10 @@ let createTagFN = function() {};
let removeTagFN = function() {};
let deleteUnusedTagsFN = function() {};
let startTorrentsByTagFN = function() {};
let pauseTorrentsByTagFN = function() {};
let stopTorrentsByTagFN = function() {};
let deleteTorrentsByTagFN = function() {};
let resumeTorrentsByTrackerFN = function() {};
let pauseTorrentsByTrackerFN = function() {};
let startTorrentsByTrackerFN = function() {};
let stopTorrentsByTrackerFN = function() {};
let deleteTorrentsByTrackerFN = function() {};
let copyNameFN = function() {};
let copyInfohashFN = function(policy) {};
@@ -405,11 +405,11 @@ const initializeWindows = function() {
deleteFN();
});
pauseFN = function() {
stopFN = function() {
const hashes = torrentsTable.selectedRowsIds();
if (hashes.length) {
new Request({
url: 'api/v2/torrents/pause',
url: 'api/v2/torrents/stop',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -423,7 +423,7 @@ const initializeWindows = function() {
const hashes = torrentsTable.selectedRowsIds();
if (hashes.length) {
new Request({
url: 'api/v2/torrents/resume',
url: 'api/v2/torrents/start',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -679,7 +679,7 @@ const initializeWindows = function() {
const hashes = torrentsTable.getFilteredTorrentsHashes('all', categoryHash, TAGS_ALL, TRACKERS_ALL);
if (hashes.length) {
new Request({
url: 'api/v2/torrents/resume',
url: 'api/v2/torrents/start',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -689,11 +689,11 @@ const initializeWindows = function() {
}
};
pauseTorrentsByCategoryFN = function(categoryHash) {
stopTorrentsByCategoryFN = function(categoryHash) {
const hashes = torrentsTable.getFilteredTorrentsHashes('all', categoryHash, TAGS_ALL, TRACKERS_ALL);
if (hashes.length) {
new Request({
url: 'api/v2/torrents/pause',
url: 'api/v2/torrents/stop',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -821,7 +821,7 @@ const initializeWindows = function() {
const hashes = torrentsTable.getFilteredTorrentsHashes('all', CATEGORIES_ALL, tagHash, TRACKERS_ALL);
if (hashes.length) {
new Request({
url: 'api/v2/torrents/resume',
url: 'api/v2/torrents/start',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -831,11 +831,11 @@ const initializeWindows = function() {
}
};
pauseTorrentsByTagFN = function(tagHash) {
stopTorrentsByTagFN = function(tagHash) {
const hashes = torrentsTable.getFilteredTorrentsHashes('all', CATEGORIES_ALL, tagHash, TRACKERS_ALL);
if (hashes.length) {
new Request({
url: 'api/v2/torrents/pause',
url: 'api/v2/torrents/stop',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -864,7 +864,7 @@ const initializeWindows = function() {
}
};
resumeTorrentsByTrackerFN = function(trackerHash) {
startTorrentsByTrackerFN = function(trackerHash) {
const trackerHashInt = Number.parseInt(trackerHash, 10);
let hashes = [];
switch (trackerHashInt) {
@@ -881,7 +881,7 @@ const initializeWindows = function() {
if (hashes.length > 0) {
new Request({
url: 'api/v2/torrents/resume',
url: 'api/v2/torrents/start',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -891,7 +891,7 @@ const initializeWindows = function() {
}
};
pauseTorrentsByTrackerFN = function(trackerHash) {
stopTorrentsByTrackerFN = function(trackerHash) {
const trackerHashInt = Number.parseInt(trackerHash, 10);
let hashes = [];
switch (trackerHashInt) {
@@ -908,7 +908,7 @@ const initializeWindows = function() {
if (hashes.length) {
new Request({
url: 'api/v2/torrents/pause',
url: 'api/v2/torrents/stop',
method: 'post',
data: {
hashes: hashes.join("|")
@@ -1047,12 +1047,12 @@ const initializeWindows = function() {
}
};
addClickEvent('pauseAll', (e) => {
addClickEvent('stopAll', (e) => {
new Event(e).stop();
if (confirm('QBT_TR(Would you like to pause all torrents?)QBT_TR[CONTEXT=MainWindow]')) {
if (confirm('QBT_TR(Would you like to stop all torrents?)QBT_TR[CONTEXT=MainWindow]')) {
new Request({
url: 'api/v2/torrents/pause',
url: 'api/v2/torrents/stop',
method: 'post',
data: {
hashes: "all"
@@ -1062,12 +1062,12 @@ const initializeWindows = function() {
}
});
addClickEvent('resumeAll', (e) => {
addClickEvent('startAll', (e) => {
new Event(e).stop();
if (confirm('QBT_TR(Would you like to resume all torrents?)QBT_TR[CONTEXT=MainWindow]')) {
if (confirm('QBT_TR(Would you like to start all torrents?)QBT_TR[CONTEXT=MainWindow]')) {
new Request({
url: 'api/v2/torrents/resume',
url: 'api/v2/torrents/start',
method: 'post',
data: {
hashes: "all"
@@ -1077,7 +1077,7 @@ const initializeWindows = function() {
}
});
['pause', 'resume', 'recheck'].each(function(item) {
['stop', 'start', 'recheck'].each(function(item) {
addClickEvent(item, function(e) {
new Event(e).stop();
const hashes = torrentsTable.selectedRowsIds();

View File

@@ -63,7 +63,7 @@
<label for="startTorrent">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="hidden" id="startTorrentHidden" name="paused" />
<input type="hidden" id="startTorrentHidden" name="stopped" />
<input type="checkbox" id="startTorrent" />
</td>
</tr>

View File

@@ -7,8 +7,8 @@
<li id="downloading_filter"><a href="#" onclick="setFilter('downloading');return false;"><img src="images/downloading.svg" alt="Downloading" />QBT_TR(Downloading (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="seeding_filter"><a href="#" onclick="setFilter('seeding');return false;"><img src="images/upload.svg" alt="Seeding" />QBT_TR(Seeding (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="completed_filter"><a href="#" onclick="setFilter('completed');return false;"><img src="images/checked-completed.svg" alt="Completed" />QBT_TR(Completed (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="resumed_filter"><a href="#" onclick="setFilter('resumed');return false;"><img src="images/torrent-start.svg" alt="Resumed" />QBT_TR(Resumed (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="paused_filter"><a href="#" onclick="setFilter('paused');return false;"><img src="images/stopped.svg" alt="Paused" />QBT_TR(Paused (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="running_filter"><a href="#" onclick="setFilter('running');return false;"><img src="images/torrent-start.svg" alt="Running" />QBT_TR(Running (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="stopped_filter"><a href="#" onclick="setFilter('stopped');return false;"><img src="images/stopped.svg" alt="Stopped" />QBT_TR(Stopped (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="active_filter"><a href="#" onclick="setFilter('active');return false;"><img src="images/filter-active.svg" alt="Active" />QBT_TR(Active (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="inactive_filter"><a href="#" onclick="setFilter('inactive');return false;"><img src="images/filter-inactive.svg" alt="Inactive" />QBT_TR(Inactive (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
<li id="stalled_filter"><a href="#" onclick="setFilter('stalled');return false;"><img src="images/filter-stalled.svg" alt="Stalled" />QBT_TR(Stalled (0))QBT_TR[CONTEXT=StatusFilterWidget]</a></li>
@@ -79,8 +79,8 @@
startTorrentsByCategory: function(element, ref) {
startTorrentsByCategoryFN(Number(element.id));
},
pauseTorrentsByCategory: function(element, ref) {
pauseTorrentsByCategoryFN(Number(element.id));
stopTorrentsByCategory: function(element, ref) {
stopTorrentsByCategoryFN(Number(element.id));
},
deleteTorrentsByCategory: function(element, ref) {
deleteTorrentsByCategoryFN(Number(element.id));
@@ -111,8 +111,8 @@
startTorrentsByTag: function(element, ref) {
startTorrentsByTagFN(Number(element.id));
},
pauseTorrentsByTag: function(element, ref) {
pauseTorrentsByTagFN(Number(element.id));
stopTorrentsByTag: function(element, ref) {
stopTorrentsByTagFN(Number(element.id));
},
deleteTorrentsByTag: function(element, ref) {
deleteTorrentsByTagFN(Number(element.id));
@@ -131,11 +131,11 @@
targets: '.trackersFilterContextMenuTarget',
menu: 'trackersFilterMenu',
actions: {
resumeTorrentsByTracker: function(element, ref) {
resumeTorrentsByTrackerFN(element.id);
startTorrentsByTracker: function(element, ref) {
startTorrentsByTrackerFN(element.id);
},
pauseTorrentsByTracker: function(element, ref) {
pauseTorrentsByTrackerFN(element.id);
stopTorrentsByTracker: function(element, ref) {
stopTorrentsByTrackerFN(element.id);
},
deleteTorrentsByTracker: function(element, ref) {
deleteTorrentsByTrackerFN(element.id);

View File

@@ -705,7 +705,7 @@
<td style="text-align: right;"><label for="max_ratio_act">QBT_TR(then)QBT_TR[CONTEXT=OptionsDialog]</label></td>
<td>
<select id="max_ratio_act">
<option value="0">QBT_TR(Pause torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="0">QBT_TR(Stop torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="1">QBT_TR(Remove torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="3">QBT_TR(Remove torrent and its files)QBT_TR[CONTEXT=OptionsDialog]</option>
<option value="2">QBT_TR(Enable super seeding for torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
@@ -2012,7 +2012,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
}
$('contentlayout_select').getChildren('option')[index].selected = true;
$('addToTopOfQueueCheckbox').setProperty('checked', pref.add_to_top_of_queue);
$('dontstartdownloads_checkbox').setProperty('checked', pref.start_paused_enabled);
$('dontstartdownloads_checkbox').setProperty('checked', pref.add_stopped_enabled);
switch (pref.torrent_stop_condition) {
case "None":
index = 0;
@@ -2232,7 +2232,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
$('max_inactive_seeding_time_value').setProperty('value', (pref.max_inactive_seeding_time_enabled ? pref.max_inactive_seeding_time.toInt() : 1440));
let maxRatioAct = 0;
switch (pref.max_ratio_act.toInt()) {
case 0: // Pause
case 0: // Stop
default:
maxRatioAct = 0;
break;
@@ -2406,7 +2406,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
// When adding a torrent
settings['torrent_content_layout'] = $('contentlayout_select').getSelected()[0].getProperty('value');
settings['add_to_top_of_queue'] = $('addToTopOfQueueCheckbox').getProperty('checked');
settings['start_paused_enabled'] = $('dontstartdownloads_checkbox').getProperty('checked');
settings['add_stopped_enabled'] = $('dontstartdownloads_checkbox').getProperty('checked');
settings['torrent_stop_condition'] = $('stopConditionSelect').getSelected()[0].getProperty('value');
settings['auto_delete_mode'] = Number($('deletetorrentfileafter_checkbox').getProperty('checked'));

View File

@@ -247,10 +247,10 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
<table class="fullWidth">
<tr>
<td>
<label class="noWrap">QBT_TR(Add Paused:)QBT_TR[CONTEXT=AutomatedRssDownloader]</label>
<label class="noWrap">QBT_TR(Add Stopped:)QBT_TR[CONTEXT=AutomatedRssDownloader]</label>
</td>
<td class="fullWidth">
<select disabled id="addPausedCombobox" class="fullWidth">
<select disabled id="addStoppedCombobox" class="fullWidth">
<option value="default">QBT_TR(Use global settings)QBT_TR[CONTEXT=AutomatedRssDownloader]</option>
<option value="always">QBT_TR(Always)QBT_TR[CONTEXT=AutomatedRssDownloader]</option>
<option value="never">QBT_TR(Never)QBT_TR[CONTEXT=AutomatedRssDownloader]</option>
@@ -589,7 +589,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
rulesList[rule].torrentParams.use_auto_tmm = false;
}
switch ($('addPausedCombobox').value) {
switch ($('addStoppedCombobox').value) {
case 'default':
rulesList[rule].torrentParams.stopped = null;
break;
@@ -673,7 +673,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('savetoDifferentDir').disabled = true;
$('saveToText').disabled = true;
$('ignoreDaysValue').disabled = true;
$('addPausedCombobox').disabled = true;
$('addStoppedCombobox').disabled = true;
$('contentLayoutCombobox').disabled = true;
// reset all boxes
@@ -688,7 +688,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('saveToText').value = '';
$('ignoreDaysValue').value = 0;
$('lastMatchText').textContent = 'QBT_TR(Last Match: Unknown)QBT_TR[CONTEXT=AutomatedRssDownloader]';
$('addPausedCombobox').value = 'default';
$('addStoppedCombobox').value = 'default';
$('contentLayoutCombobox').value = 'Default';
rssDownloaderFeedSelectionTable.clear();
rssDownloaderArticlesTable.clear();
@@ -709,7 +709,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('ruleAddTags').disabled = false;
$('savetoDifferentDir').disabled = false;
$('ignoreDaysValue').disabled = false;
$('addPausedCombobox').disabled = false;
$('addStoppedCombobox').disabled = false;
$('contentLayoutCombobox').disabled = false;
// load rule settings
@@ -737,9 +737,9 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
}
if (rulesList[ruleName].torrentParams.stopped === null)
$('addPausedCombobox').value = 'default';
$('addStoppedCombobox').value = 'default';
else
$('addPausedCombobox').value = rulesList[ruleName].torrentParams.stopped ? 'always' : 'never';
$('addStoppedCombobox').value = rulesList[ruleName].torrentParams.stopped ? 'always' : 'never';
if (rulesList[ruleName].torrentParams.content_layout === null)
$('contentLayoutCombobox').value = 'Default';

View File

@@ -37,8 +37,8 @@
start: function(element, ref) {
startFN();
},
pause: function(element, ref) {
pauseFN();
stop: function(element, ref) {
stopFN();
},
forceStart: function(element, ref) {
setForceStartFN();

View File

@@ -333,6 +333,8 @@
<file>private/images/mascot.png</file>
<file>private/images/name.svg</file>
<file>private/images/object-locked.svg</file>
<file>private/images/pause-session.svg</file>
<file>private/images/paused.svg</file>
<file>private/images/peers-add.svg</file>
<file>private/images/peers-remove.svg</file>
<file>private/images/queued.svg</file>