Use Start/Stop instead of Resume/Pause
PR #20532. --------- Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
|
@ -140,8 +140,8 @@ namespace
|
|||
if (!addTorrentParams.savePath.isEmpty())
|
||||
result.append(u"@savePath=" + addTorrentParams.savePath.data());
|
||||
|
||||
if (addTorrentParams.addPaused.has_value())
|
||||
result.append(*addTorrentParams.addPaused ? u"@addPaused=1"_s : u"@addPaused=0"_s);
|
||||
if (addTorrentParams.addStopped.has_value())
|
||||
result.append(*addTorrentParams.addStopped ? u"@addStopped=1"_s : u"@addStopped=0"_s);
|
||||
|
||||
if (addTorrentParams.skipChecking)
|
||||
result.append(u"@skipChecking"_s);
|
||||
|
@ -180,9 +180,9 @@ namespace
|
|||
continue;
|
||||
}
|
||||
|
||||
if (param.startsWith(u"@addPaused="))
|
||||
if (param.startsWith(u"@addStopped="))
|
||||
{
|
||||
addTorrentParams.addPaused = (QStringView(param).mid(11).toInt() != 0);
|
||||
addTorrentParams.addStopped = (QStringView(param).mid(11).toInt() != 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -263,8 +263,8 @@ namespace
|
|||
}
|
||||
|
||||
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "Parameter '%1' must follow syntax '%1=%2'",
|
||||
"e.g. Parameter '--add-paused' must follow syntax "
|
||||
"'--add-paused=<true|false>'")
|
||||
"e.g. Parameter '--add-stopped' must follow syntax "
|
||||
"'--add-stopped=<true|false>'")
|
||||
.arg(fullParameter(), u"<true|false>"_s));
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ namespace
|
|||
constexpr const StringOption CONFIGURATION_OPTION {"configuration"};
|
||||
constexpr const BoolOption RELATIVE_FASTRESUME {"relative-fastresume"};
|
||||
constexpr const StringOption SAVE_PATH_OPTION {"save-path"};
|
||||
constexpr const TriStateBoolOption PAUSED_OPTION {"add-paused", true};
|
||||
constexpr const TriStateBoolOption STOPPED_OPTION {"add-stopped", true};
|
||||
constexpr const BoolOption SKIP_HASH_CHECK_OPTION {"skip-hash-check"};
|
||||
constexpr const StringOption CATEGORY_OPTION {"category"};
|
||||
constexpr const BoolOption SEQUENTIAL_OPTION {"sequential"};
|
||||
|
@ -345,7 +345,7 @@ QBtCommandLineParameters::QBtCommandLineParameters(const QProcessEnvironment &en
|
|||
addTorrentParams.skipChecking = SKIP_HASH_CHECK_OPTION.value(env);
|
||||
addTorrentParams.sequential = SEQUENTIAL_OPTION.value(env);
|
||||
addTorrentParams.firstLastPiecePriority = FIRST_AND_LAST_OPTION.value(env);
|
||||
addTorrentParams.addPaused = PAUSED_OPTION.value(env);
|
||||
addTorrentParams.addStopped = STOPPED_OPTION.value(env);
|
||||
}
|
||||
|
||||
QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
||||
|
@ -417,9 +417,9 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
|||
{
|
||||
result.addTorrentParams.savePath = Path(SAVE_PATH_OPTION.value(arg));
|
||||
}
|
||||
else if (arg == PAUSED_OPTION)
|
||||
else if (arg == STOPPED_OPTION)
|
||||
{
|
||||
result.addTorrentParams.addPaused = PAUSED_OPTION.value(arg);
|
||||
result.addTorrentParams.addStopped = STOPPED_OPTION.value(arg);
|
||||
}
|
||||
else if (arg == SKIP_HASH_CHECK_OPTION)
|
||||
{
|
||||
|
@ -523,7 +523,7 @@ QString makeUsage(const QString &prgName)
|
|||
|
||||
+ wrapText(QCoreApplication::translate("CMD Options", "Options when adding new torrents:"), 0) + u'\n'
|
||||
+ SAVE_PATH_OPTION.usage(QCoreApplication::translate("CMD Options", "path")) + wrapText(QCoreApplication::translate("CMD Options", "Torrent save path")) + u'\n'
|
||||
+ PAUSED_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Add torrents as started or paused")) + u'\n'
|
||||
+ STOPPED_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Add torrents as running or stopped")) + u'\n'
|
||||
+ SKIP_HASH_CHECK_OPTION.usage() + wrapText(QCoreApplication::translate("CMD Options", "Skip hash check")) + u'\n'
|
||||
+ CATEGORY_OPTION.usage(QCoreApplication::translate("CMD Options", "name"))
|
||||
+ wrapText(QCoreApplication::translate("CMD Options", "Assign torrents to category. If the category doesn't exist, it will be "
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
const int MIGRATION_VERSION = 7;
|
||||
const int MIGRATION_VERSION = 8;
|
||||
const QString MIGRATION_VERSION_KEY = u"Meta/MigrationVersion"_s;
|
||||
|
||||
void exportWebUIHttpsFiles()
|
||||
|
@ -468,6 +468,16 @@ namespace
|
|||
|
||||
settingsStorage->removeValue(oldKey);
|
||||
}
|
||||
|
||||
void migrateAddPausedSetting()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto oldKey = u"BitTorrent/Session/AddTorrentPaused"_s;
|
||||
const auto newKey = u"BitTorrent/Session/AddTorrentStopped"_s;
|
||||
|
||||
settingsStorage->storeValue(newKey, settingsStorage->loadValue<bool>(oldKey));
|
||||
settingsStorage->removeValue(oldKey);
|
||||
}
|
||||
}
|
||||
|
||||
bool upgrade()
|
||||
|
@ -509,6 +519,9 @@ bool upgrade()
|
|||
if (version < 7)
|
||||
migrateShareLimitActionSettings();
|
||||
|
||||
if (version < 8)
|
||||
migrateAddPausedSetting();
|
||||
|
||||
version = MIGRATION_VERSION;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ BitTorrent::AddTorrentParams BitTorrent::parseAddTorrentParams(const QJsonObject
|
|||
.downloadPath = Path(jsonObj.value(PARAM_DOWNLOADPATH).toString()),
|
||||
.addForced = (getEnum<TorrentOperatingMode>(jsonObj, PARAM_OPERATINGMODE) == TorrentOperatingMode::Forced),
|
||||
.addToQueueTop = getOptionalBool(jsonObj, PARAM_QUEUETOP),
|
||||
.addPaused = getOptionalBool(jsonObj, PARAM_STOPPED),
|
||||
.addStopped = getOptionalBool(jsonObj, PARAM_STOPPED),
|
||||
.stopCondition = getOptionalEnum<Torrent::StopCondition>(jsonObj, PARAM_STOPCONDITION),
|
||||
.filePaths = {},
|
||||
.filePriorities = {},
|
||||
|
@ -163,8 +163,8 @@ QJsonObject BitTorrent::serializeAddTorrentParams(const AddTorrentParams ¶ms
|
|||
|
||||
if (params.addToQueueTop)
|
||||
jsonObj[PARAM_QUEUETOP] = *params.addToQueueTop;
|
||||
if (params.addPaused)
|
||||
jsonObj[PARAM_STOPPED] = *params.addPaused;
|
||||
if (params.addStopped)
|
||||
jsonObj[PARAM_STOPPED] = *params.addStopped;
|
||||
if (params.stopCondition)
|
||||
jsonObj[PARAM_STOPCONDITION] = Utils::String::fromEnum(*params.stopCondition);
|
||||
if (params.contentLayout)
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace BitTorrent
|
|||
bool firstLastPiecePriority = false;
|
||||
bool addForced = false;
|
||||
std::optional<bool> addToQueueTop;
|
||||
std::optional<bool> addPaused;
|
||||
std::optional<bool> addStopped;
|
||||
std::optional<Torrent::StopCondition> stopCondition;
|
||||
PathList filePaths; // used if TorrentInfo is set
|
||||
QVector<DownloadPriority> filePriorities; // used if TorrentInfo is set
|
||||
|
|
|
@ -213,8 +213,8 @@ namespace BitTorrent
|
|||
virtual void setPeXEnabled(bool enabled) = 0;
|
||||
virtual bool isAddTorrentToQueueTop() const = 0;
|
||||
virtual void setAddTorrentToQueueTop(bool value) = 0;
|
||||
virtual bool isAddTorrentPaused() const = 0;
|
||||
virtual void setAddTorrentPaused(bool value) = 0;
|
||||
virtual bool isAddTorrentStopped() const = 0;
|
||||
virtual void setAddTorrentStopped(bool value) = 0;
|
||||
virtual Torrent::StopCondition torrentStopCondition() const = 0;
|
||||
virtual void setTorrentStopCondition(Torrent::StopCondition stopCondition) = 0;
|
||||
virtual TorrentContentLayout torrentContentLayout() const = 0;
|
||||
|
@ -476,8 +476,8 @@ namespace BitTorrent
|
|||
void torrentFinished(Torrent *torrent);
|
||||
void torrentFinishedChecking(Torrent *torrent);
|
||||
void torrentMetadataReceived(Torrent *torrent);
|
||||
void torrentPaused(Torrent *torrent);
|
||||
void torrentResumed(Torrent *torrent);
|
||||
void torrentStopped(Torrent *torrent);
|
||||
void torrentStarted(Torrent *torrent);
|
||||
void torrentSavePathChanged(Torrent *torrent);
|
||||
void torrentSavingModeChanged(Torrent *torrent);
|
||||
void torrentsLoaded(const QVector<Torrent *> &torrents);
|
||||
|
|
|
@ -461,7 +461,7 @@ SessionImpl::SessionImpl(QObject *parent)
|
|||
, m_globalMaxSeedingMinutes(BITTORRENT_SESSION_KEY(u"GlobalMaxSeedingMinutes"_s), -1, lowerLimited(-1))
|
||||
, m_globalMaxInactiveSeedingMinutes(BITTORRENT_SESSION_KEY(u"GlobalMaxInactiveSeedingMinutes"_s), -1, lowerLimited(-1))
|
||||
, m_isAddTorrentToQueueTop(BITTORRENT_SESSION_KEY(u"AddTorrentToTopOfQueue"_s), false)
|
||||
, m_isAddTorrentPaused(BITTORRENT_SESSION_KEY(u"AddTorrentPaused"_s), false)
|
||||
, m_isAddTorrentStopped(BITTORRENT_SESSION_KEY(u"AddTorrentStopped"_s), false)
|
||||
, m_torrentStopCondition(BITTORRENT_SESSION_KEY(u"TorrentStopCondition"_s), Torrent::StopCondition::None)
|
||||
, m_torrentContentLayout(BITTORRENT_SESSION_KEY(u"TorrentContentLayout"_s), TorrentContentLayout::Original)
|
||||
, m_isAppendExtensionEnabled(BITTORRENT_SESSION_KEY(u"AddExtensionToIncompleteFiles"_s), false)
|
||||
|
@ -1114,14 +1114,14 @@ void SessionImpl::setAddTorrentToQueueTop(bool value)
|
|||
m_isAddTorrentToQueueTop = value;
|
||||
}
|
||||
|
||||
bool SessionImpl::isAddTorrentPaused() const
|
||||
bool SessionImpl::isAddTorrentStopped() const
|
||||
{
|
||||
return m_isAddTorrentPaused;
|
||||
return m_isAddTorrentStopped;
|
||||
}
|
||||
|
||||
void SessionImpl::setAddTorrentPaused(const bool value)
|
||||
void SessionImpl::setAddTorrentStopped(const bool value)
|
||||
{
|
||||
m_isAddTorrentPaused = value;
|
||||
m_isAddTorrentStopped = value;
|
||||
}
|
||||
|
||||
Torrent::StopCondition SessionImpl::torrentStopCondition() const
|
||||
|
@ -2274,12 +2274,12 @@ void SessionImpl::processShareLimits()
|
|||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removing torrent and deleting its content."), torrentName));
|
||||
deleteTorrent(torrentID, DeleteTorrentAndFiles);
|
||||
}
|
||||
else if ((shareLimitAction == ShareLimitAction::Stop) && !torrent->isPaused())
|
||||
else if ((shareLimitAction == ShareLimitAction::Stop) && !torrent->isStopped())
|
||||
{
|
||||
torrent->pause();
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Torrent paused."), torrentName));
|
||||
torrent->stop();
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Torrent stopped."), torrentName));
|
||||
}
|
||||
else if ((shareLimitAction == ShareLimitAction::EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding())
|
||||
else if ((shareLimitAction == ShareLimitAction::EnableSuperSeeding) && !torrent->isStopped() && !torrent->superSeeding())
|
||||
{
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Super seeding enabled."), torrentName));
|
||||
|
@ -2596,7 +2596,7 @@ LoadTorrentParams SessionImpl::initLoadTorrentParams(const AddTorrentParams &add
|
|||
loadTorrentParams.hasFinishedStatus = addTorrentParams.skipChecking; // do not react on 'torrent_finished_alert' when skipping
|
||||
loadTorrentParams.contentLayout = addTorrentParams.contentLayout.value_or(torrentContentLayout());
|
||||
loadTorrentParams.operatingMode = (addTorrentParams.addForced ? TorrentOperatingMode::Forced : TorrentOperatingMode::AutoManaged);
|
||||
loadTorrentParams.stopped = addTorrentParams.addPaused.value_or(isAddTorrentPaused());
|
||||
loadTorrentParams.stopped = addTorrentParams.addStopped.value_or(isAddTorrentStopped());
|
||||
loadTorrentParams.stopCondition = addTorrentParams.stopCondition.value_or(torrentStopCondition());
|
||||
loadTorrentParams.addToQueueTop = addTorrentParams.addToQueueTop.value_or(isAddTorrentToQueueTop());
|
||||
loadTorrentParams.ratioLimit = addTorrentParams.ratioLimit;
|
||||
|
@ -4896,7 +4896,7 @@ void SessionImpl::handleTorrentMetadataReceived(TorrentImpl *const torrent)
|
|||
emit torrentMetadataReceived(torrent);
|
||||
}
|
||||
|
||||
void SessionImpl::handleTorrentPaused(TorrentImpl *const torrent)
|
||||
void SessionImpl::handleTorrentStopped(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->resetTrackerEntries();
|
||||
|
||||
|
@ -4907,14 +4907,14 @@ void SessionImpl::handleTorrentPaused(TorrentImpl *const torrent)
|
|||
updatedTrackerEntries.emplace(trackerEntry.url, trackerEntry);
|
||||
emit trackerEntriesUpdated(torrent, updatedTrackerEntries);
|
||||
|
||||
LogMsg(tr("Torrent paused. Torrent: \"%1\"").arg(torrent->name()));
|
||||
emit torrentPaused(torrent);
|
||||
LogMsg(tr("Torrent stopped. Torrent: \"%1\"").arg(torrent->name()));
|
||||
emit torrentStopped(torrent);
|
||||
}
|
||||
|
||||
void SessionImpl::handleTorrentResumed(TorrentImpl *const torrent)
|
||||
void SessionImpl::handleTorrentStarted(TorrentImpl *const torrent)
|
||||
{
|
||||
LogMsg(tr("Torrent resumed. Torrent: \"%1\"").arg(torrent->name()));
|
||||
emit torrentResumed(torrent);
|
||||
emit torrentStarted(torrent);
|
||||
}
|
||||
|
||||
void SessionImpl::handleTorrentChecked(TorrentImpl *const torrent)
|
||||
|
@ -4932,7 +4932,7 @@ void SessionImpl::handleTorrentFinished(TorrentImpl *const torrent)
|
|||
|
||||
const bool hasUnfinishedTorrents = std::any_of(m_torrents.cbegin(), m_torrents.cend(), [](const TorrentImpl *torrent)
|
||||
{
|
||||
return !(torrent->isFinished() || torrent->isPaused() || torrent->isErrored());
|
||||
return !(torrent->isFinished() || torrent->isStopped() || torrent->isErrored());
|
||||
});
|
||||
if (!hasUnfinishedTorrents)
|
||||
emit allTorrentsFinished();
|
||||
|
@ -6151,7 +6151,7 @@ void SessionImpl::updateTrackerEntries(lt::torrent_handle torrentHandle, QHash<s
|
|||
, updatedTrackers = std::move(updatedTrackers)]
|
||||
{
|
||||
TorrentImpl *torrent = m_torrents.value(torrentHandle.info_hash());
|
||||
if (!torrent || torrent->isPaused())
|
||||
if (!torrent || torrent->isStopped())
|
||||
return;
|
||||
|
||||
QHash<QString, TrackerEntry> updatedTrackerEntries;
|
||||
|
|
|
@ -189,8 +189,8 @@ namespace BitTorrent
|
|||
void setPeXEnabled(bool enabled) override;
|
||||
bool isAddTorrentToQueueTop() const override;
|
||||
void setAddTorrentToQueueTop(bool value) override;
|
||||
bool isAddTorrentPaused() const override;
|
||||
void setAddTorrentPaused(bool value) override;
|
||||
bool isAddTorrentStopped() const override;
|
||||
void setAddTorrentStopped(bool value) override;
|
||||
Torrent::StopCondition torrentStopCondition() const override;
|
||||
void setTorrentStopCondition(Torrent::StopCondition stopCondition) override;
|
||||
TorrentContentLayout torrentContentLayout() const override;
|
||||
|
@ -439,8 +439,8 @@ namespace BitTorrent
|
|||
void handleTorrentTagRemoved(TorrentImpl *torrent, const Tag &tag);
|
||||
void handleTorrentSavingModeChanged(TorrentImpl *torrent);
|
||||
void handleTorrentMetadataReceived(TorrentImpl *torrent);
|
||||
void handleTorrentPaused(TorrentImpl *torrent);
|
||||
void handleTorrentResumed(TorrentImpl *torrent);
|
||||
void handleTorrentStopped(TorrentImpl *torrent);
|
||||
void handleTorrentStarted(TorrentImpl *torrent);
|
||||
void handleTorrentChecked(TorrentImpl *torrent);
|
||||
void handleTorrentFinished(TorrentImpl *torrent);
|
||||
void handleTorrentTrackersAdded(TorrentImpl *torrent, const QVector<TrackerEntry> &newTrackers);
|
||||
|
@ -663,7 +663,7 @@ namespace BitTorrent
|
|||
CachedSettingValue<int> m_globalMaxSeedingMinutes;
|
||||
CachedSettingValue<int> m_globalMaxInactiveSeedingMinutes;
|
||||
CachedSettingValue<bool> m_isAddTorrentToQueueTop;
|
||||
CachedSettingValue<bool> m_isAddTorrentPaused;
|
||||
CachedSettingValue<bool> m_isAddTorrentStopped;
|
||||
CachedSettingValue<Torrent::StopCondition> m_torrentStopCondition;
|
||||
CachedSettingValue<TorrentContentLayout> m_torrentContentLayout;
|
||||
CachedSettingValue<bool> m_isAppendExtensionEnabled;
|
||||
|
|
|
@ -60,9 +60,9 @@ namespace BitTorrent
|
|||
return infoHash().toTorrentID();
|
||||
}
|
||||
|
||||
bool Torrent::isResumed() const
|
||||
bool Torrent::isRunning() const
|
||||
{
|
||||
return !isPaused();
|
||||
return !isStopped();
|
||||
}
|
||||
|
||||
qlonglong Torrent::remainingSize() const
|
||||
|
|
|
@ -94,8 +94,8 @@ namespace BitTorrent
|
|||
CheckingUploading,
|
||||
CheckingDownloading,
|
||||
|
||||
PausedDownloading,
|
||||
PausedUploading,
|
||||
StoppedDownloading,
|
||||
StoppedUploading,
|
||||
|
||||
Moving,
|
||||
|
||||
|
@ -228,7 +228,7 @@ namespace BitTorrent
|
|||
|
||||
virtual TorrentInfo info() const = 0;
|
||||
virtual bool isFinished() const = 0;
|
||||
virtual bool isPaused() const = 0;
|
||||
virtual bool isStopped() const = 0;
|
||||
virtual bool isQueued() const = 0;
|
||||
virtual bool isForced() const = 0;
|
||||
virtual bool isChecking() const = 0;
|
||||
|
@ -290,8 +290,8 @@ namespace BitTorrent
|
|||
virtual void setName(const QString &name) = 0;
|
||||
virtual void setSequentialDownload(bool enable) = 0;
|
||||
virtual void setFirstLastPiecePriority(bool enabled) = 0;
|
||||
virtual void pause() = 0;
|
||||
virtual void resume(TorrentOperatingMode mode = TorrentOperatingMode::AutoManaged) = 0;
|
||||
virtual void stop() = 0;
|
||||
virtual void start(TorrentOperatingMode mode = TorrentOperatingMode::AutoManaged) = 0;
|
||||
virtual void forceReannounce(int index = -1) = 0;
|
||||
virtual void forceDHTAnnounce() = 0;
|
||||
virtual void forceRecheck() = 0;
|
||||
|
@ -325,7 +325,7 @@ namespace BitTorrent
|
|||
virtual void fetchDownloadingPieces(std::function<void (QBitArray)> resultHandler) const = 0;
|
||||
|
||||
TorrentID id() const;
|
||||
bool isResumed() const;
|
||||
bool isRunning() const;
|
||||
qlonglong remainingSize() const;
|
||||
|
||||
void toggleSequentialDownload();
|
||||
|
|
|
@ -981,15 +981,15 @@ TorrentInfo TorrentImpl::info() const
|
|||
return m_torrentInfo;
|
||||
}
|
||||
|
||||
bool TorrentImpl::isPaused() const
|
||||
bool TorrentImpl::isStopped() const
|
||||
{
|
||||
return m_isStopped;
|
||||
}
|
||||
|
||||
bool TorrentImpl::isQueued() const
|
||||
{
|
||||
// Torrent is Queued if it isn't in Paused state but paused internally
|
||||
return (!isPaused()
|
||||
// Torrent is Queued if it isn't in Stopped state but paused internally
|
||||
return (!isStopped()
|
||||
&& (m_nativeStatus.flags & lt::torrent_flags::auto_managed)
|
||||
&& (m_nativeStatus.flags & lt::torrent_flags::paused));
|
||||
}
|
||||
|
@ -1009,7 +1009,7 @@ bool TorrentImpl::isDownloading() const
|
|||
case TorrentState::ForcedDownloadingMetadata:
|
||||
case TorrentState::StalledDownloading:
|
||||
case TorrentState::CheckingDownloading:
|
||||
case TorrentState::PausedDownloading:
|
||||
case TorrentState::StoppedDownloading:
|
||||
case TorrentState::QueuedDownloading:
|
||||
case TorrentState::ForcedDownloading:
|
||||
return true;
|
||||
|
@ -1049,7 +1049,7 @@ bool TorrentImpl::isCompleted() const
|
|||
case TorrentState::Uploading:
|
||||
case TorrentState::StalledUploading:
|
||||
case TorrentState::CheckingUploading:
|
||||
case TorrentState::PausedUploading:
|
||||
case TorrentState::StoppedUploading:
|
||||
case TorrentState::QueuedUploading:
|
||||
case TorrentState::ForcedUploading:
|
||||
return true;
|
||||
|
@ -1102,7 +1102,7 @@ bool TorrentImpl::isFinished() const
|
|||
|
||||
bool TorrentImpl::isForced() const
|
||||
{
|
||||
return (!isPaused() && (m_operatingMode == TorrentOperatingMode::Forced));
|
||||
return (!isStopped() && (m_operatingMode == TorrentOperatingMode::Forced));
|
||||
}
|
||||
|
||||
bool TorrentImpl::isSequentialDownload() const
|
||||
|
@ -1140,22 +1140,22 @@ void TorrentImpl::updateState()
|
|||
}
|
||||
else if (!hasMetadata())
|
||||
{
|
||||
if (isPaused())
|
||||
m_state = TorrentState::PausedDownloading;
|
||||
if (isStopped())
|
||||
m_state = TorrentState::StoppedDownloading;
|
||||
else if (m_session->isQueueingSystemEnabled() && isQueued())
|
||||
m_state = TorrentState::QueuedDownloading;
|
||||
else
|
||||
m_state = isForced() ? TorrentState::ForcedDownloadingMetadata : TorrentState::DownloadingMetadata;
|
||||
}
|
||||
else if ((m_nativeStatus.state == lt::torrent_status::checking_files) && !isPaused())
|
||||
else if ((m_nativeStatus.state == lt::torrent_status::checking_files) && !isStopped())
|
||||
{
|
||||
// If the torrent is not just in the "checking" state, but is being actually checked
|
||||
m_state = m_hasFinishedStatus ? TorrentState::CheckingUploading : TorrentState::CheckingDownloading;
|
||||
}
|
||||
else if (isFinished())
|
||||
{
|
||||
if (isPaused())
|
||||
m_state = TorrentState::PausedUploading;
|
||||
if (isStopped())
|
||||
m_state = TorrentState::StoppedUploading;
|
||||
else if (m_session->isQueueingSystemEnabled() && isQueued())
|
||||
m_state = TorrentState::QueuedUploading;
|
||||
else if (isForced())
|
||||
|
@ -1167,8 +1167,8 @@ void TorrentImpl::updateState()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (isPaused())
|
||||
m_state = TorrentState::PausedDownloading;
|
||||
if (isStopped())
|
||||
m_state = TorrentState::StoppedDownloading;
|
||||
else if (m_session->isQueueingSystemEnabled() && isQueued())
|
||||
m_state = TorrentState::QueuedDownloading;
|
||||
else if (isForced())
|
||||
|
@ -1236,7 +1236,7 @@ qlonglong TorrentImpl::finishedTime() const
|
|||
|
||||
qlonglong TorrentImpl::eta() const
|
||||
{
|
||||
if (isPaused()) return MAX_ETA;
|
||||
if (isStopped()) return MAX_ETA;
|
||||
|
||||
const SpeedSampleAvg speedAverage = m_payloadRateMonitor.average();
|
||||
|
||||
|
@ -1499,14 +1499,14 @@ qreal TorrentImpl::realRatio() const
|
|||
|
||||
int TorrentImpl::uploadPayloadRate() const
|
||||
{
|
||||
// workaround: suppress the speed for paused state
|
||||
return isPaused() ? 0 : m_nativeStatus.upload_payload_rate;
|
||||
// workaround: suppress the speed for Stopped state
|
||||
return isStopped() ? 0 : m_nativeStatus.upload_payload_rate;
|
||||
}
|
||||
|
||||
int TorrentImpl::downloadPayloadRate() const
|
||||
{
|
||||
// workaround: suppress the speed for paused state
|
||||
return isPaused() ? 0 : m_nativeStatus.download_payload_rate;
|
||||
// workaround: suppress the speed for Stopped state
|
||||
return isStopped() ? 0 : m_nativeStatus.download_payload_rate;
|
||||
}
|
||||
|
||||
qlonglong TorrentImpl::totalPayloadUpload() const
|
||||
|
@ -1597,10 +1597,10 @@ void TorrentImpl::forceRecheck()
|
|||
m_nativeStatus.pieces.clear_all();
|
||||
m_nativeStatus.num_pieces = 0;
|
||||
|
||||
if (isPaused())
|
||||
if (isStopped())
|
||||
{
|
||||
// When "force recheck" is applied on paused torrent, we temporarily resume it
|
||||
resume();
|
||||
// When "force recheck" is applied on Stopped torrent, we start them to perform checking
|
||||
start();
|
||||
m_stopCondition = StopCondition::FilesChecked;
|
||||
}
|
||||
}
|
||||
|
@ -1768,7 +1768,7 @@ void TorrentImpl::endReceivedMetadataHandling(const Path &savePath, const PathLi
|
|||
p.flags |= lt::torrent_flags::paused;
|
||||
p.flags &= ~lt::torrent_flags::auto_managed;
|
||||
|
||||
m_session->handleTorrentPaused(this);
|
||||
m_session->handleTorrentStopped(this);
|
||||
}
|
||||
|
||||
reload();
|
||||
|
@ -1836,14 +1836,14 @@ void TorrentImpl::reload()
|
|||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::pause()
|
||||
void TorrentImpl::stop()
|
||||
{
|
||||
if (!m_isStopped)
|
||||
{
|
||||
m_stopCondition = StopCondition::None;
|
||||
m_isStopped = true;
|
||||
deferredRequestResumeData();
|
||||
m_session->handleTorrentPaused(this);
|
||||
m_session->handleTorrentStopped(this);
|
||||
}
|
||||
|
||||
if (m_maintenanceJob == MaintenanceJob::None)
|
||||
|
@ -1855,7 +1855,7 @@ void TorrentImpl::pause()
|
|||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::resume(const TorrentOperatingMode mode)
|
||||
void TorrentImpl::start(const TorrentOperatingMode mode)
|
||||
{
|
||||
if (hasError())
|
||||
{
|
||||
|
@ -1878,7 +1878,7 @@ void TorrentImpl::resume(const TorrentOperatingMode mode)
|
|||
{
|
||||
m_isStopped = false;
|
||||
deferredRequestResumeData();
|
||||
m_session->handleTorrentResumed(this);
|
||||
m_session->handleTorrentStarted(this);
|
||||
}
|
||||
|
||||
if (m_maintenanceJob == MaintenanceJob::None)
|
||||
|
@ -1967,7 +1967,7 @@ void TorrentImpl::handleTorrentCheckedAlert([[maybe_unused]] const lt::torrent_c
|
|||
}
|
||||
|
||||
if (stopCondition() == StopCondition::FilesChecked)
|
||||
pause();
|
||||
stop();
|
||||
|
||||
m_statusUpdatedTriggers.enqueue([this]()
|
||||
{
|
||||
|
@ -1983,7 +1983,7 @@ void TorrentImpl::handleTorrentCheckedAlert([[maybe_unused]] const lt::torrent_c
|
|||
adjustStorageLocation();
|
||||
manageActualFilePaths();
|
||||
|
||||
if (!isPaused())
|
||||
if (!isStopped())
|
||||
{
|
||||
// torrent is internally paused using NativeTorrentExtension after files checked
|
||||
// so we need to resume it if there is no corresponding "stop condition" set
|
||||
|
@ -2468,7 +2468,7 @@ void TorrentImpl::setStopCondition(const StopCondition stopCondition)
|
|||
if (stopCondition == m_stopCondition)
|
||||
return;
|
||||
|
||||
if (isPaused())
|
||||
if (isStopped())
|
||||
return;
|
||||
|
||||
if ((stopCondition == StopCondition::MetadataReceived) && hasMetadata())
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace BitTorrent
|
|||
|
||||
TorrentInfo info() const override;
|
||||
bool isFinished() const override;
|
||||
bool isPaused() const override;
|
||||
bool isStopped() const override;
|
||||
bool isQueued() const override;
|
||||
bool isForced() const override;
|
||||
bool isChecking() const override;
|
||||
|
@ -222,8 +222,8 @@ namespace BitTorrent
|
|||
void setName(const QString &name) override;
|
||||
void setSequentialDownload(bool enable) override;
|
||||
void setFirstLastPiecePriority(bool enabled) override;
|
||||
void pause() override;
|
||||
void resume(TorrentOperatingMode mode = TorrentOperatingMode::AutoManaged) override;
|
||||
void stop() override;
|
||||
void start(TorrentOperatingMode mode = TorrentOperatingMode::AutoManaged) override;
|
||||
void forceReannounce(int index = -1) override;
|
||||
void forceDHTAnnounce() override;
|
||||
void forceRecheck() override;
|
||||
|
|
|
@ -468,7 +468,7 @@ QJsonObject AutoDownloadRule::toJsonObject() const
|
|||
|
||||
// TODO: The following code is deprecated. Replace with the commented one after several releases in 4.6.x.
|
||||
// === BEGIN DEPRECATED CODE === //
|
||||
, {S_ADD_PAUSED, toJsonValue(addTorrentParams.addPaused)}
|
||||
, {S_ADD_PAUSED, toJsonValue(addTorrentParams.addStopped)}
|
||||
, {S_CONTENT_LAYOUT, contentLayoutToJsonValue(addTorrentParams.contentLayout)}
|
||||
, {S_SAVE_PATH, addTorrentParams.savePath.toString()}
|
||||
, {S_ASSIGNED_CATEGORY, addTorrentParams.category}
|
||||
|
@ -525,7 +525,7 @@ AutoDownloadRule AutoDownloadRule::fromJsonObject(const QJsonObject &jsonObj, co
|
|||
{
|
||||
addTorrentParams.savePath = Path(jsonObj.value(S_SAVE_PATH).toString());
|
||||
addTorrentParams.category = jsonObj.value(S_ASSIGNED_CATEGORY).toString();
|
||||
addTorrentParams.addPaused = toOptionalBool(jsonObj.value(S_ADD_PAUSED));
|
||||
addTorrentParams.addStopped = toOptionalBool(jsonObj.value(S_ADD_PAUSED));
|
||||
if (!addTorrentParams.savePath.isEmpty())
|
||||
addTorrentParams.useAutoTMM = false;
|
||||
|
||||
|
@ -568,7 +568,7 @@ QVariantHash AutoDownloadRule::toLegacyDict() const
|
|||
{u"enabled"_s, isEnabled()},
|
||||
{u"category_assigned"_s, addTorrentParams.category},
|
||||
{u"use_regex"_s, useRegex()},
|
||||
{u"add_paused"_s, toAddPausedLegacy(addTorrentParams.addPaused)},
|
||||
{u"add_paused"_s, toAddPausedLegacy(addTorrentParams.addStopped)},
|
||||
{u"episode_filter"_s, episodeFilter()},
|
||||
{u"last_match"_s, lastMatch()},
|
||||
{u"ignore_days"_s, ignoreDays()}};
|
||||
|
@ -579,7 +579,7 @@ AutoDownloadRule AutoDownloadRule::fromLegacyDict(const QVariantHash &dict)
|
|||
BitTorrent::AddTorrentParams addTorrentParams;
|
||||
addTorrentParams.savePath = Path(dict.value(u"save_path"_s).toString());
|
||||
addTorrentParams.category = dict.value(u"category_assigned"_s).toString();
|
||||
addTorrentParams.addPaused = addPausedLegacyToOptionalBool(dict.value(u"add_paused"_s).toInt());
|
||||
addTorrentParams.addStopped = addPausedLegacyToOptionalBool(dict.value(u"add_paused"_s).toInt());
|
||||
if (!addTorrentParams.savePath.isEmpty())
|
||||
addTorrentParams.useAutoTMM = false;
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ const std::optional<Tag> TorrentFilter::AnyTag;
|
|||
const TorrentFilter TorrentFilter::DownloadingTorrent(TorrentFilter::Downloading);
|
||||
const TorrentFilter TorrentFilter::SeedingTorrent(TorrentFilter::Seeding);
|
||||
const TorrentFilter TorrentFilter::CompletedTorrent(TorrentFilter::Completed);
|
||||
const TorrentFilter TorrentFilter::PausedTorrent(TorrentFilter::Paused);
|
||||
const TorrentFilter TorrentFilter::ResumedTorrent(TorrentFilter::Resumed);
|
||||
const TorrentFilter TorrentFilter::StoppedTorrent(TorrentFilter::Stopped);
|
||||
const TorrentFilter TorrentFilter::RunningTorrent(TorrentFilter::Running);
|
||||
const TorrentFilter TorrentFilter::ActiveTorrent(TorrentFilter::Active);
|
||||
const TorrentFilter TorrentFilter::InactiveTorrent(TorrentFilter::Inactive);
|
||||
const TorrentFilter TorrentFilter::StalledTorrent(TorrentFilter::Stalled);
|
||||
|
@ -90,10 +90,10 @@ bool TorrentFilter::setTypeByName(const QString &filter)
|
|||
type = Seeding;
|
||||
else if (filter == u"completed")
|
||||
type = Completed;
|
||||
else if (filter == u"paused")
|
||||
type = Paused;
|
||||
else if (filter == u"resumed")
|
||||
type = Resumed;
|
||||
else if (filter == u"stopped")
|
||||
type = Stopped;
|
||||
else if (filter == u"running")
|
||||
type = Running;
|
||||
else if (filter == u"active")
|
||||
type = Active;
|
||||
else if (filter == u"inactive")
|
||||
|
@ -167,10 +167,10 @@ bool TorrentFilter::matchState(const BitTorrent::Torrent *const torrent) const
|
|||
return torrent->isUploading();
|
||||
case Completed:
|
||||
return torrent->isCompleted();
|
||||
case Paused:
|
||||
return torrent->isPaused();
|
||||
case Resumed:
|
||||
return torrent->isResumed();
|
||||
case Stopped:
|
||||
return torrent->isStopped();
|
||||
case Running:
|
||||
return torrent->isRunning();
|
||||
case Active:
|
||||
return torrent->isActive();
|
||||
case Inactive:
|
||||
|
|
|
@ -52,8 +52,8 @@ public:
|
|||
Downloading,
|
||||
Seeding,
|
||||
Completed,
|
||||
Resumed,
|
||||
Paused,
|
||||
Running,
|
||||
Stopped,
|
||||
Active,
|
||||
Inactive,
|
||||
Stalled,
|
||||
|
@ -72,8 +72,8 @@ public:
|
|||
static const TorrentFilter DownloadingTorrent;
|
||||
static const TorrentFilter SeedingTorrent;
|
||||
static const TorrentFilter CompletedTorrent;
|
||||
static const TorrentFilter PausedTorrent;
|
||||
static const TorrentFilter ResumedTorrent;
|
||||
static const TorrentFilter StoppedTorrent;
|
||||
static const TorrentFilter RunningTorrent;
|
||||
static const TorrentFilter ActiveTorrent;
|
||||
static const TorrentFilter InactiveTorrent;
|
||||
static const TorrentFilter StalledTorrent;
|
||||
|
|
|
@ -325,7 +325,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::TorrentDescriptor &to
|
|||
}
|
||||
else
|
||||
{
|
||||
m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addPaused.value_or(session->isAddTorrentPaused()));
|
||||
m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addStopped.value_or(session->isAddTorrentStopped()));
|
||||
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(QVariant::fromValue(stopCondition)));
|
||||
}
|
||||
m_ui->stopConditionLabel->setEnabled(m_ui->startTorrentCheckBox->isChecked());
|
||||
|
@ -693,7 +693,7 @@ void AddNewTorrentDialog::accept()
|
|||
m_storeRememberLastSavePath = m_ui->checkBoxRememberLastSavePath->isChecked();
|
||||
|
||||
m_torrentParams.addToQueueTop = m_ui->addToQueueTopCheckBox->isChecked();
|
||||
m_torrentParams.addPaused = !m_ui->startTorrentCheckBox->isChecked();
|
||||
m_torrentParams.addStopped = !m_ui->startTorrentCheckBox->isChecked();
|
||||
m_torrentParams.stopCondition = m_ui->stopConditionComboBox->currentData().value<BitTorrent::Torrent::StopCondition>();
|
||||
m_torrentParams.contentLayout = static_cast<BitTorrent::TorrentContentLayout>(m_ui->contentLayoutComboBox->currentIndex());
|
||||
|
||||
|
|
|
@ -240,15 +240,15 @@ void AddTorrentParamsWidget::populate()
|
|||
m_ui->tagsLineEdit->setText(Utils::String::joinIntoString(m_addTorrentParams.tags, u", "_s));
|
||||
|
||||
m_ui->startTorrentComboBox->disconnect(this);
|
||||
m_ui->startTorrentComboBox->setCurrentIndex(m_addTorrentParams.addPaused
|
||||
? m_ui->startTorrentComboBox->findData(!*m_addTorrentParams.addPaused) : 0);
|
||||
m_ui->startTorrentComboBox->setCurrentIndex(m_addTorrentParams.addStopped
|
||||
? m_ui->startTorrentComboBox->findData(!*m_addTorrentParams.addStopped) : 0);
|
||||
connect(m_ui->startTorrentComboBox, &QComboBox::currentIndexChanged, this, [this]
|
||||
{
|
||||
const QVariant data = m_ui->startTorrentComboBox->currentData();
|
||||
if (!data.isValid())
|
||||
m_addTorrentParams.addPaused = std::nullopt;
|
||||
m_addTorrentParams.addStopped = std::nullopt;
|
||||
else
|
||||
m_addTorrentParams.addPaused = !data.toBool();
|
||||
m_addTorrentParams.addStopped = !data.toBool();
|
||||
});
|
||||
|
||||
m_ui->skipCheckingCheckBox->disconnect(this);
|
||||
|
|
|
@ -167,8 +167,8 @@ MainWindow::MainWindow(IGUIApplication *app, const WindowState initialState, con
|
|||
m_ui->actionExit->setIcon(UIThemeManager::instance()->getIcon(u"application-exit"_s));
|
||||
m_ui->actionLock->setIcon(UIThemeManager::instance()->getIcon(u"object-locked"_s));
|
||||
m_ui->actionOptions->setIcon(UIThemeManager::instance()->getIcon(u"configure"_s, u"preferences-system"_s));
|
||||
m_ui->actionPause->setIcon(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s));
|
||||
m_ui->actionPauseAll->setIcon(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s));
|
||||
m_ui->actionStop->setIcon(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s));
|
||||
m_ui->actionStopAll->setIcon(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s));
|
||||
m_ui->actionStart->setIcon(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s));
|
||||
m_ui->actionStartAll->setIcon(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s));
|
||||
m_ui->menuAutoShutdownOnDownloadsCompletion->setIcon(UIThemeManager::instance()->getIcon(u"task-complete"_s, u"application-exit"_s));
|
||||
|
@ -285,9 +285,9 @@ MainWindow::MainWindow(IGUIApplication *app, const WindowState initialState, con
|
|||
|
||||
// Transfer list slots
|
||||
connect(m_ui->actionStart, &QAction::triggered, m_transferListWidget, &TransferListWidget::startSelectedTorrents);
|
||||
connect(m_ui->actionStartAll, &QAction::triggered, m_transferListWidget, &TransferListWidget::resumeAllTorrents);
|
||||
connect(m_ui->actionPause, &QAction::triggered, m_transferListWidget, &TransferListWidget::pauseSelectedTorrents);
|
||||
connect(m_ui->actionPauseAll, &QAction::triggered, m_transferListWidget, &TransferListWidget::pauseAllTorrents);
|
||||
connect(m_ui->actionStartAll, &QAction::triggered, m_transferListWidget, &TransferListWidget::startAllTorrents);
|
||||
connect(m_ui->actionStop, &QAction::triggered, m_transferListWidget, &TransferListWidget::stopSelectedTorrents);
|
||||
connect(m_ui->actionStopAll, &QAction::triggered, m_transferListWidget, &TransferListWidget::stopAllTorrents);
|
||||
connect(m_ui->actionDelete, &QAction::triggered, m_transferListWidget, &TransferListWidget::softDeleteSelectedTorrents);
|
||||
connect(m_ui->actionTopQueuePos, &QAction::triggered, m_transferListWidget, &TransferListWidget::topQueuePosSelectedTorrents);
|
||||
connect(m_ui->actionIncreaseQueuePos, &QAction::triggered, m_transferListWidget, &TransferListWidget::increaseQueuePosSelectedTorrents);
|
||||
|
@ -882,8 +882,8 @@ void MainWindow::createKeyboardShortcuts()
|
|||
m_ui->actionStatistics->setShortcut(Qt::CTRL | Qt::Key_I);
|
||||
m_ui->actionStart->setShortcut(Qt::CTRL | Qt::Key_S);
|
||||
m_ui->actionStartAll->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_S);
|
||||
m_ui->actionPause->setShortcut(Qt::CTRL | Qt::Key_P);
|
||||
m_ui->actionPauseAll->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_P);
|
||||
m_ui->actionStop->setShortcut(Qt::CTRL | Qt::Key_P);
|
||||
m_ui->actionStopAll->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_P);
|
||||
m_ui->actionBottomQueuePos->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_Minus);
|
||||
m_ui->actionDecreaseQueuePos->setShortcut(Qt::CTRL | Qt::Key_Minus);
|
||||
m_ui->actionIncreaseQueuePos->setShortcut(Qt::CTRL | Qt::Key_Plus);
|
||||
|
@ -1568,7 +1568,7 @@ QMenu *MainWindow::createDesktopIntegrationMenu()
|
|||
menu->addSeparator();
|
||||
|
||||
menu->addAction(m_ui->actionStartAll);
|
||||
menu->addAction(m_ui->actionPauseAll);
|
||||
menu->addAction(m_ui->actionStopAll);
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
menu->addSeparator();
|
||||
|
@ -1887,10 +1887,10 @@ void MainWindow::updatePowerManagementState() const
|
|||
const QVector<BitTorrent::Torrent *> allTorrents = BitTorrent::Session::instance()->torrents();
|
||||
const bool inhibitSuspend = std::any_of(allTorrents.cbegin(), allTorrents.cend(), [&](const BitTorrent::Torrent *torrent)
|
||||
{
|
||||
if (preventFromSuspendWhenDownloading && (!torrent->isFinished() && !torrent->isPaused() && !torrent->isErrored() && torrent->hasMetadata()))
|
||||
if (preventFromSuspendWhenDownloading && (!torrent->isFinished() && !torrent->isStopped() && !torrent->isErrored() && torrent->hasMetadata()))
|
||||
return true;
|
||||
|
||||
if (preventFromSuspendWhenSeeding && (torrent->isFinished() && !torrent->isPaused()))
|
||||
if (preventFromSuspendWhenSeeding && (torrent->isFinished() && !torrent->isStopped()))
|
||||
return true;
|
||||
|
||||
return torrent->isMoving();
|
||||
|
|
|
@ -170,7 +170,7 @@ private slots:
|
|||
void on_actionDownloadFromURL_triggered();
|
||||
void on_actionExit_triggered();
|
||||
void on_actionLock_triggered();
|
||||
// Check for unpaused downloading or seeding torrents and prevent system suspend/sleep according to preferences
|
||||
// Check for non-stopped downloading or seeding torrents and prevent system suspend/sleep according to preferences
|
||||
void updatePowerManagementState() const;
|
||||
|
||||
void toolbarMenuRequested();
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
<string>&Edit</string>
|
||||
</property>
|
||||
<addaction name="actionStart"/>
|
||||
<addaction name="actionPause"/>
|
||||
<addaction name="actionStop"/>
|
||||
<addaction name="actionStartAll"/>
|
||||
<addaction name="actionPauseAll"/>
|
||||
<addaction name="actionStopAll"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDelete"/>
|
||||
<addaction name="actionTopQueuePos"/>
|
||||
|
@ -153,7 +153,7 @@
|
|||
<addaction name="actionDelete"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionStart"/>
|
||||
<addaction name="actionPause"/>
|
||||
<addaction name="actionStop"/>
|
||||
<addaction name="actionTopQueuePos"/>
|
||||
<addaction name="actionIncreaseQueuePos"/>
|
||||
<addaction name="actionDecreaseQueuePos"/>
|
||||
|
@ -188,22 +188,22 @@
|
|||
</action>
|
||||
<action name="actionStart">
|
||||
<property name="text">
|
||||
<string>&Resume</string>
|
||||
<string>Sta&rt</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPause">
|
||||
<action name="actionStop">
|
||||
<property name="text">
|
||||
<string>&Pause</string>
|
||||
<string>Sto&p</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionStartAll">
|
||||
<property name="text">
|
||||
<string>R&esume All</string>
|
||||
<string>Star&t All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPauseAll">
|
||||
<action name="actionStopAll">
|
||||
<property name="text">
|
||||
<string>P&ause All</string>
|
||||
<string>&Stop All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDelete">
|
||||
|
|
|
@ -253,17 +253,17 @@ void OptionsDialog::loadBehaviorTabOptions()
|
|||
m_ui->comboHideZero->setCurrentIndex(pref->getHideZeroComboValues());
|
||||
m_ui->comboHideZero->setEnabled(m_ui->checkHideZero->isChecked());
|
||||
|
||||
m_ui->actionTorrentDlOnDblClBox->setItemData(0, TOGGLE_PAUSE);
|
||||
m_ui->actionTorrentDlOnDblClBox->setItemData(0, TOGGLE_STOP);
|
||||
m_ui->actionTorrentDlOnDblClBox->setItemData(1, OPEN_DEST);
|
||||
m_ui->actionTorrentDlOnDblClBox->setItemData(2, PREVIEW_FILE);
|
||||
m_ui->actionTorrentDlOnDblClBox->setItemData(3, SHOW_OPTIONS);
|
||||
m_ui->actionTorrentDlOnDblClBox->setItemData(4, NO_ACTION);
|
||||
int actionDownloading = pref->getActionOnDblClOnTorrentDl();
|
||||
if ((actionDownloading < 0) || (actionDownloading >= m_ui->actionTorrentDlOnDblClBox->count()))
|
||||
actionDownloading = TOGGLE_PAUSE;
|
||||
actionDownloading = TOGGLE_STOP;
|
||||
m_ui->actionTorrentDlOnDblClBox->setCurrentIndex(m_ui->actionTorrentDlOnDblClBox->findData(actionDownloading));
|
||||
|
||||
m_ui->actionTorrentFnOnDblClBox->setItemData(0, TOGGLE_PAUSE);
|
||||
m_ui->actionTorrentFnOnDblClBox->setItemData(0, TOGGLE_STOP);
|
||||
m_ui->actionTorrentFnOnDblClBox->setItemData(1, OPEN_DEST);
|
||||
m_ui->actionTorrentFnOnDblClBox->setItemData(2, PREVIEW_FILE);
|
||||
m_ui->actionTorrentFnOnDblClBox->setItemData(3, SHOW_OPTIONS);
|
||||
|
@ -281,7 +281,7 @@ void OptionsDialog::loadBehaviorTabOptions()
|
|||
m_ui->checkShowSplash->setChecked(!pref->isSplashScreenDisabled());
|
||||
m_ui->checkProgramExitConfirm->setChecked(pref->confirmOnExit());
|
||||
m_ui->checkProgramAutoExitConfirm->setChecked(!pref->dontConfirmAutoExit());
|
||||
m_ui->checkConfirmPauseAndResumeAll->setChecked(pref->confirmPauseAndResumeAll());
|
||||
m_ui->checkConfirmStopAndStartAll->setChecked(pref->confirmPauseAndResumeAll());
|
||||
|
||||
m_ui->windowStateComboBox->addItem(tr("Normal"), QVariant::fromValue(WindowState::Normal));
|
||||
m_ui->windowStateComboBox->addItem(tr("Minimized"), QVariant::fromValue(WindowState::Minimized));
|
||||
|
@ -381,7 +381,7 @@ void OptionsDialog::loadBehaviorTabOptions()
|
|||
connect(m_ui->checkShowSplash, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkProgramExitConfirm, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkProgramAutoExitConfirm, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkConfirmPauseAndResumeAll, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkConfirmStopAndStartAll, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkShowSystray, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkMinimizeToSysTray, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkCloseToSystray, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
|
@ -464,7 +464,7 @@ void OptionsDialog::saveBehaviorTabOptions() const
|
|||
pref->setSplashScreenDisabled(isSplashScreenDisabled());
|
||||
pref->setConfirmOnExit(m_ui->checkProgramExitConfirm->isChecked());
|
||||
pref->setDontConfirmAutoExit(!m_ui->checkProgramAutoExitConfirm->isChecked());
|
||||
pref->setConfirmPauseAndResumeAll(m_ui->checkConfirmPauseAndResumeAll->isChecked());
|
||||
pref->setConfirmPauseAndResumeAll(m_ui->checkConfirmStopAndStartAll->isChecked());
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
pref->setWinStartup(WinStartup());
|
||||
|
@ -522,7 +522,7 @@ void OptionsDialog::loadDownloadsTabOptions()
|
|||
|
||||
m_ui->contentLayoutComboBox->setCurrentIndex(static_cast<int>(session->torrentContentLayout()));
|
||||
m_ui->checkAddToQueueTop->setChecked(session->isAddTorrentToQueueTop());
|
||||
m_ui->checkStartPaused->setChecked(session->isAddTorrentPaused());
|
||||
m_ui->checkAddStopped->setChecked(session->isAddTorrentStopped());
|
||||
|
||||
m_ui->stopConditionComboBox->setToolTip(
|
||||
u"<html><body><p><b>" + tr("None") + u"</b> - " + tr("No stop condition is set.") + u"</p><p><b>" +
|
||||
|
@ -534,8 +534,8 @@ void OptionsDialog::loadDownloadsTabOptions()
|
|||
m_ui->stopConditionComboBox->setItemData(1, QVariant::fromValue(BitTorrent::Torrent::StopCondition::MetadataReceived));
|
||||
m_ui->stopConditionComboBox->setItemData(2, QVariant::fromValue(BitTorrent::Torrent::StopCondition::FilesChecked));
|
||||
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(QVariant::fromValue(session->torrentStopCondition())));
|
||||
m_ui->stopConditionLabel->setEnabled(!m_ui->checkStartPaused->isChecked());
|
||||
m_ui->stopConditionComboBox->setEnabled(!m_ui->checkStartPaused->isChecked());
|
||||
m_ui->stopConditionLabel->setEnabled(!m_ui->checkAddStopped->isChecked());
|
||||
m_ui->stopConditionComboBox->setEnabled(!m_ui->checkAddStopped->isChecked());
|
||||
|
||||
m_ui->checkMergeTrackers->setChecked(session->isMergeTrackersEnabled());
|
||||
m_ui->checkConfirmMergeTrackers->setEnabled(m_ui->checkAdditionDialog->isChecked());
|
||||
|
@ -655,8 +655,8 @@ void OptionsDialog::loadDownloadsTabOptions()
|
|||
connect(m_ui->contentLayoutComboBox, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
||||
|
||||
connect(m_ui->checkAddToQueueTop, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkStartPaused, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkStartPaused, &QAbstractButton::toggled, this, [this](const bool checked)
|
||||
connect(m_ui->checkAddStopped, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkAddStopped, &QAbstractButton::toggled, this, [this](const bool checked)
|
||||
{
|
||||
m_ui->stopConditionLabel->setEnabled(!checked);
|
||||
m_ui->stopConditionComboBox->setEnabled(!checked);
|
||||
|
@ -732,7 +732,7 @@ void OptionsDialog::saveDownloadsTabOptions() const
|
|||
session->setTorrentContentLayout(static_cast<BitTorrent::TorrentContentLayout>(m_ui->contentLayoutComboBox->currentIndex()));
|
||||
|
||||
session->setAddTorrentToQueueTop(m_ui->checkAddToQueueTop->isChecked());
|
||||
session->setAddTorrentPaused(addTorrentsInPause());
|
||||
session->setAddTorrentStopped(addTorrentsStopped());
|
||||
session->setTorrentStopCondition(m_ui->stopConditionComboBox->currentData().value<BitTorrent::Torrent::StopCondition>());
|
||||
TorrentFileGuard::setAutoDeleteMode(!m_ui->deleteTorrentBox->isChecked() ? TorrentFileGuard::Never
|
||||
: !m_ui->deleteCancelledTorrentBox->isChecked() ? TorrentFileGuard::IfAdded
|
||||
|
@ -1687,9 +1687,9 @@ bool OptionsDialog::preAllocateAllFiles() const
|
|||
return m_ui->checkPreallocateAll->isChecked();
|
||||
}
|
||||
|
||||
bool OptionsDialog::addTorrentsInPause() const
|
||||
bool OptionsDialog::addTorrentsStopped() const
|
||||
{
|
||||
return m_ui->checkStartPaused->isChecked();
|
||||
return m_ui->checkAddStopped->isChecked();
|
||||
}
|
||||
|
||||
// Proxy settings
|
||||
|
|
|
@ -42,7 +42,7 @@ class AdvancedSettings;
|
|||
// actions on double-click on torrents
|
||||
enum DoubleClickAction
|
||||
{
|
||||
TOGGLE_PAUSE = 0,
|
||||
TOGGLE_STOP = 0,
|
||||
OPEN_DEST = 1,
|
||||
PREVIEW_FILE = 2,
|
||||
NO_ACTION = 3,
|
||||
|
@ -151,7 +151,7 @@ private:
|
|||
// Downloads
|
||||
bool preAllocateAllFiles() const;
|
||||
bool useAdditionDialog() const;
|
||||
bool addTorrentsInPause() const;
|
||||
bool addTorrentsStopped() const;
|
||||
Path getTorrentExportDir() const;
|
||||
Path getFinishedTorrentExportDir() const;
|
||||
// Connection options
|
||||
|
|
|
@ -227,12 +227,12 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkConfirmPauseAndResumeAll">
|
||||
<widget class="QCheckBox" name="checkConfirmStopAndStartAll">
|
||||
<property name="toolTip">
|
||||
<string>Shows a confirmation dialog upon pausing/resuming all the torrents</string>
|
||||
<string>Shows a confirmation dialog upon pausing/starting all the torrents</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Confirm "Pause/Resume all" actions</string>
|
||||
<string>Confirm "Stop/Start all" actions</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
|
@ -267,7 +267,7 @@
|
|||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Paused torrents only</string>
|
||||
<string>Stopped torrents only</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
@ -925,12 +925,12 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkStartPaused">
|
||||
<widget class="QCheckBox" name="checkAddStopped">
|
||||
<property name="toolTip">
|
||||
<string>The torrent will be added to download list in a paused state</string>
|
||||
<string>The torrent will be added to download list in a stopped state</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string extracomment="The torrent will be added to download list in a paused state">Do not start the download automatically</string>
|
||||
<string extracomment="The torrent will be added to download list in a stopped state">Do not start the download automatically</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -3043,7 +3043,7 @@ Disable encryption: Only connect to peers without protocol encryption</string>
|
|||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Pause torrent</string>
|
||||
<string>Stop torrent</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -3897,7 +3897,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
|
|||
<tabstop>comboI18n</tabstop>
|
||||
<tabstop>checkUseCustomTheme</tabstop>
|
||||
<tabstop>customThemeFilePath</tabstop>
|
||||
<tabstop>checkStartPaused</tabstop>
|
||||
<tabstop>checkAddStopped</tabstop>
|
||||
<tabstop>stopConditionComboBox</tabstop>
|
||||
<tabstop>spinPort</tabstop>
|
||||
<tabstop>checkUPnP</tabstop>
|
||||
|
|
|
@ -437,7 +437,7 @@ void PropertiesWidget::loadDynamicData()
|
|||
|
||||
m_ui->labelTotalPiecesVal->setText(tr("%1 x %2 (have %3)", "(torrent pieces) eg 152 x 4MB (have 25)").arg(m_torrent->piecesCount()).arg(Utils::Misc::friendlyUnit(m_torrent->pieceLength())).arg(m_torrent->piecesHave()));
|
||||
|
||||
if (!m_torrent->isFinished() && !m_torrent->isPaused() && !m_torrent->isQueued() && !m_torrent->isChecking())
|
||||
if (!m_torrent->isFinished() && !m_torrent->isStopped() && !m_torrent->isQueued() && !m_torrent->isChecking())
|
||||
{
|
||||
// Pieces availability
|
||||
showPiecesAvailability(true);
|
||||
|
|
|
@ -546,7 +546,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string extracomment="Time (duration) the torrent is active (not paused)">Time Active:</string>
|
||||
<string extracomment="Time (duration) the torrent is active (not stopped)">Time Active:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
|
|
@ -169,9 +169,9 @@ void PluginSelectDialog::togglePluginState(QTreeWidgetItem *item, int)
|
|||
|
||||
void PluginSelectDialog::displayContextMenu()
|
||||
{
|
||||
// Enable/disable pause/start action given the DL state
|
||||
const QList<QTreeWidgetItem *> items = m_ui->pluginsTree->selectedItems();
|
||||
if (items.isEmpty()) return;
|
||||
if (items.isEmpty())
|
||||
return;
|
||||
|
||||
QMenu *myContextMenu = new QMenu(this);
|
||||
myContextMenu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
|
|
@ -346,14 +346,14 @@ void TrackerListWidget::showTrackerListMenu()
|
|||
, this, &TrackerListWidget::deleteSelectedTrackers);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-copy"_s), tr("Copy tracker URL")
|
||||
, this, &TrackerListWidget::copyTrackerUrl);
|
||||
if (!torrent()->isPaused())
|
||||
if (!torrent()->isStopped())
|
||||
{
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"reannounce"_s, u"view-refresh"_s), tr("Force reannounce to selected trackers")
|
||||
, this, &TrackerListWidget::reannounceSelected);
|
||||
}
|
||||
}
|
||||
|
||||
if (!torrent()->isPaused())
|
||||
if (!torrent()->isStopped())
|
||||
{
|
||||
menu->addSeparator();
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"reannounce"_s, u"view-refresh"_s), tr("Force reannounce to all trackers")
|
||||
|
|
|
@ -74,7 +74,7 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
switch (state)
|
||||
{
|
||||
case TorrentState::Error:
|
||||
case TorrentState::PausedDownloading:
|
||||
case TorrentState::StoppedDownloading:
|
||||
case TorrentState::Unknown:
|
||||
return false;
|
||||
default:
|
||||
|
|
|
@ -128,10 +128,10 @@ void CategoryFilterWidget::showMenu()
|
|||
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-clear"_s, u"list-remove"_s), tr("Remove unused categories")
|
||||
, this, &CategoryFilterWidget::removeUnusedCategories);
|
||||
menu->addSeparator();
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Resume torrents")
|
||||
, this, &CategoryFilterWidget::actionResumeTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Pause torrents")
|
||||
, this, &CategoryFilterWidget::actionPauseTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Start torrents")
|
||||
, this, &CategoryFilterWidget::actionStartTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Stop torrents")
|
||||
, this, &CategoryFilterWidget::actionStopTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"list-remove"_s), tr("Remove torrents")
|
||||
, this, &CategoryFilterWidget::actionDeleteTorrentsTriggered);
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ public:
|
|||
|
||||
signals:
|
||||
void categoryChanged(const QString &categoryName);
|
||||
void actionResumeTorrentsTriggered();
|
||||
void actionPauseTorrentsTriggered();
|
||||
void actionStartTorrentsTriggered();
|
||||
void actionStopTorrentsTriggered();
|
||||
void actionDeleteTorrentsTriggered();
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -55,12 +55,12 @@ StatusFilterWidget::StatusFilterWidget(QWidget *parent, TransferListWidget *tran
|
|||
auto *completed = new QListWidgetItem(this);
|
||||
completed->setData(Qt::DisplayRole, tr("Completed (0)"));
|
||||
completed->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"checked-completed"_s, u"completed"_s));
|
||||
auto *resumed = new QListWidgetItem(this);
|
||||
resumed->setData(Qt::DisplayRole, tr("Resumed (0)"));
|
||||
resumed->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s));
|
||||
auto *paused = new QListWidgetItem(this);
|
||||
paused->setData(Qt::DisplayRole, tr("Paused (0)"));
|
||||
paused->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"stopped"_s, u"media-playback-pause"_s));
|
||||
auto *running = new QListWidgetItem(this);
|
||||
running->setData(Qt::DisplayRole, tr("Running (0)"));
|
||||
running->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s));
|
||||
auto *stopped = new QListWidgetItem(this);
|
||||
stopped->setData(Qt::DisplayRole, tr("Stopped (0)"));
|
||||
stopped->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"stopped"_s, u"media-playback-pause"_s));
|
||||
auto *active = new QListWidgetItem(this);
|
||||
active->setData(Qt::DisplayRole, tr("Active (0)"));
|
||||
active->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"filter-active"_s, u"filteractive"_s));
|
||||
|
@ -147,8 +147,8 @@ void StatusFilterWidget::updateTorrentStatus(const BitTorrent::Torrent *torrent)
|
|||
update(TorrentFilter::Downloading, m_nbDownloading);
|
||||
update(TorrentFilter::Seeding, m_nbSeeding);
|
||||
update(TorrentFilter::Completed, m_nbCompleted);
|
||||
update(TorrentFilter::Resumed, m_nbResumed);
|
||||
update(TorrentFilter::Paused, m_nbPaused);
|
||||
update(TorrentFilter::Running, m_nbRunning);
|
||||
update(TorrentFilter::Stopped, m_nbStopped);
|
||||
update(TorrentFilter::Active, m_nbActive);
|
||||
update(TorrentFilter::Inactive, m_nbInactive);
|
||||
update(TorrentFilter::StalledUploading, m_nbStalledUploading);
|
||||
|
@ -167,8 +167,8 @@ void StatusFilterWidget::updateTexts()
|
|||
item(TorrentFilter::Downloading)->setData(Qt::DisplayRole, tr("Downloading (%1)").arg(m_nbDownloading));
|
||||
item(TorrentFilter::Seeding)->setData(Qt::DisplayRole, tr("Seeding (%1)").arg(m_nbSeeding));
|
||||
item(TorrentFilter::Completed)->setData(Qt::DisplayRole, tr("Completed (%1)").arg(m_nbCompleted));
|
||||
item(TorrentFilter::Resumed)->setData(Qt::DisplayRole, tr("Resumed (%1)").arg(m_nbResumed));
|
||||
item(TorrentFilter::Paused)->setData(Qt::DisplayRole, tr("Paused (%1)").arg(m_nbPaused));
|
||||
item(TorrentFilter::Running)->setData(Qt::DisplayRole, tr("Running (%1)").arg(m_nbRunning));
|
||||
item(TorrentFilter::Stopped)->setData(Qt::DisplayRole, tr("Stopped (%1)").arg(m_nbStopped));
|
||||
item(TorrentFilter::Active)->setData(Qt::DisplayRole, tr("Active (%1)").arg(m_nbActive));
|
||||
item(TorrentFilter::Inactive)->setData(Qt::DisplayRole, tr("Inactive (%1)").arg(m_nbInactive));
|
||||
item(TorrentFilter::Stalled)->setData(Qt::DisplayRole, tr("Stalled (%1)").arg(m_nbStalled));
|
||||
|
@ -184,8 +184,8 @@ void StatusFilterWidget::hideZeroItems()
|
|||
item(TorrentFilter::Downloading)->setHidden(m_nbDownloading == 0);
|
||||
item(TorrentFilter::Seeding)->setHidden(m_nbSeeding == 0);
|
||||
item(TorrentFilter::Completed)->setHidden(m_nbCompleted == 0);
|
||||
item(TorrentFilter::Resumed)->setHidden(m_nbResumed == 0);
|
||||
item(TorrentFilter::Paused)->setHidden(m_nbPaused == 0);
|
||||
item(TorrentFilter::Running)->setHidden(m_nbRunning == 0);
|
||||
item(TorrentFilter::Stopped)->setHidden(m_nbStopped == 0);
|
||||
item(TorrentFilter::Active)->setHidden(m_nbActive == 0);
|
||||
item(TorrentFilter::Inactive)->setHidden(m_nbInactive == 0);
|
||||
item(TorrentFilter::Stalled)->setHidden(m_nbStalled == 0);
|
||||
|
@ -218,10 +218,10 @@ void StatusFilterWidget::showMenu()
|
|||
QMenu *menu = new QMenu(this);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Resume torrents")
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Start torrents")
|
||||
, transferList(), &TransferListWidget::startVisibleTorrents);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Pause torrents")
|
||||
, transferList(), &TransferListWidget::pauseVisibleTorrents);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Stop torrents")
|
||||
, transferList(), &TransferListWidget::stopVisibleTorrents);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"list-remove"_s), tr("Remove torrents")
|
||||
, transferList(), &TransferListWidget::deleteVisibleTorrents);
|
||||
|
||||
|
@ -251,10 +251,10 @@ void StatusFilterWidget::torrentAboutToBeDeleted(BitTorrent::Torrent *const torr
|
|||
--m_nbSeeding;
|
||||
if (status[TorrentFilter::Completed])
|
||||
--m_nbCompleted;
|
||||
if (status[TorrentFilter::Resumed])
|
||||
--m_nbResumed;
|
||||
if (status[TorrentFilter::Paused])
|
||||
--m_nbPaused;
|
||||
if (status[TorrentFilter::Running])
|
||||
--m_nbRunning;
|
||||
if (status[TorrentFilter::Stopped])
|
||||
--m_nbStopped;
|
||||
if (status[TorrentFilter::Active])
|
||||
--m_nbActive;
|
||||
if (status[TorrentFilter::Inactive])
|
||||
|
|
|
@ -68,8 +68,8 @@ private:
|
|||
int m_nbDownloading = 0;
|
||||
int m_nbSeeding = 0;
|
||||
int m_nbCompleted = 0;
|
||||
int m_nbResumed = 0;
|
||||
int m_nbPaused = 0;
|
||||
int m_nbRunning = 0;
|
||||
int m_nbStopped = 0;
|
||||
int m_nbActive = 0;
|
||||
int m_nbInactive = 0;
|
||||
int m_nbStalled = 0;
|
||||
|
|
|
@ -117,10 +117,10 @@ void TagFilterWidget::showMenu()
|
|||
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-clear"_s, u"list-remove"_s), tr("Remove unused tags")
|
||||
, this, &TagFilterWidget::removeUnusedTags);
|
||||
menu->addSeparator();
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Resume torrents")
|
||||
, this, &TagFilterWidget::actionResumeTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Pause torrents")
|
||||
, this, &TagFilterWidget::actionPauseTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Start torrents")
|
||||
, this, &TagFilterWidget::actionStartTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Stop torrents")
|
||||
, this, &TagFilterWidget::actionStopTorrentsTriggered);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"list-remove"_s), tr("Remove torrents")
|
||||
, this, &TagFilterWidget::actionDeleteTorrentsTriggered);
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ public:
|
|||
|
||||
signals:
|
||||
void tagChanged(const std::optional<Tag> &tag);
|
||||
void actionResumeTorrentsTriggered();
|
||||
void actionPauseTorrentsTriggered();
|
||||
void actionStartTorrentsTriggered();
|
||||
void actionStopTorrentsTriggered();
|
||||
void actionDeleteTorrentsTriggered();
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -568,10 +568,10 @@ void TrackersFilterWidget::showMenu()
|
|||
menu->addSeparator();
|
||||
}
|
||||
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Resume torrents")
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("Start torrents")
|
||||
, transferList(), &TransferListWidget::startVisibleTorrents);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Pause torrents")
|
||||
, transferList(), &TransferListWidget::pauseVisibleTorrents);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Stop torrents")
|
||||
, transferList(), &TransferListWidget::stopVisibleTorrents);
|
||||
menu->addAction(UIThemeManager::instance()->getIcon(u"list-remove"_s), tr("Remove torrents")
|
||||
, transferList(), &TransferListWidget::deleteVisibleTorrents);
|
||||
|
||||
|
|
|
@ -123,9 +123,9 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
|
|||
m_categoryFilterWidget = new CategoryFilterWidget(this);
|
||||
connect(m_categoryFilterWidget, &CategoryFilterWidget::actionDeleteTorrentsTriggered
|
||||
, transferList, &TransferListWidget::deleteVisibleTorrents);
|
||||
connect(m_categoryFilterWidget, &CategoryFilterWidget::actionPauseTorrentsTriggered
|
||||
, transferList, &TransferListWidget::pauseVisibleTorrents);
|
||||
connect(m_categoryFilterWidget, &CategoryFilterWidget::actionResumeTorrentsTriggered
|
||||
connect(m_categoryFilterWidget, &CategoryFilterWidget::actionStopTorrentsTriggered
|
||||
, transferList, &TransferListWidget::stopVisibleTorrents);
|
||||
connect(m_categoryFilterWidget, &CategoryFilterWidget::actionStartTorrentsTriggered
|
||||
, transferList, &TransferListWidget::startVisibleTorrents);
|
||||
connect(m_categoryFilterWidget, &CategoryFilterWidget::categoryChanged
|
||||
, transferList, &TransferListWidget::applyCategoryFilter);
|
||||
|
@ -141,9 +141,9 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
|
|||
m_tagFilterWidget = new TagFilterWidget(this);
|
||||
connect(m_tagFilterWidget, &TagFilterWidget::actionDeleteTorrentsTriggered
|
||||
, transferList, &TransferListWidget::deleteVisibleTorrents);
|
||||
connect(m_tagFilterWidget, &TagFilterWidget::actionPauseTorrentsTriggered
|
||||
, transferList, &TransferListWidget::pauseVisibleTorrents);
|
||||
connect(m_tagFilterWidget, &TagFilterWidget::actionResumeTorrentsTriggered
|
||||
connect(m_tagFilterWidget, &TagFilterWidget::actionStopTorrentsTriggered
|
||||
, transferList, &TransferListWidget::stopVisibleTorrents);
|
||||
connect(m_tagFilterWidget, &TagFilterWidget::actionStartTorrentsTriggered
|
||||
, transferList, &TransferListWidget::startVisibleTorrents);
|
||||
connect(m_tagFilterWidget, &TagFilterWidget::tagChanged
|
||||
, transferList, &TransferListWidget::applyTagFilter);
|
||||
|
|
|
@ -70,8 +70,8 @@ namespace
|
|||
{BitTorrent::TorrentState::CheckingDownloading, u"TransferList.CheckingDownloading"_s},
|
||||
{BitTorrent::TorrentState::CheckingUploading, u"TransferList.CheckingUploading"_s},
|
||||
{BitTorrent::TorrentState::CheckingResumeData, u"TransferList.CheckingResumeData"_s},
|
||||
{BitTorrent::TorrentState::PausedDownloading, u"TransferList.PausedDownloading"_s},
|
||||
{BitTorrent::TorrentState::PausedUploading, u"TransferList.PausedUploading"_s},
|
||||
{BitTorrent::TorrentState::StoppedDownloading, u"TransferList.StoppedDownloading"_s},
|
||||
{BitTorrent::TorrentState::StoppedUploading, u"TransferList.StoppedUploading"_s},
|
||||
{BitTorrent::TorrentState::Moving, u"TransferList.Moving"_s},
|
||||
{BitTorrent::TorrentState::MissingFiles, u"TransferList.MissingFiles"_s},
|
||||
{BitTorrent::TorrentState::Error, u"TransferList.Error"_s}
|
||||
|
@ -106,8 +106,8 @@ TransferListModel::TransferListModel(QObject *parent)
|
|||
{BitTorrent::TorrentState::CheckingDownloading, tr("Checking", "Torrent local data is being checked")},
|
||||
{BitTorrent::TorrentState::CheckingUploading, tr("Checking", "Torrent local data is being checked")},
|
||||
{BitTorrent::TorrentState::CheckingResumeData, tr("Checking resume data", "Used when loading the torrents from disk after qbt is launched. It checks the correctness of the .fastresume file. Normally it is completed in a fraction of a second, unless loading many many torrents.")},
|
||||
{BitTorrent::TorrentState::PausedDownloading, tr("Paused")},
|
||||
{BitTorrent::TorrentState::PausedUploading, tr("Completed")},
|
||||
{BitTorrent::TorrentState::StoppedDownloading, tr("Stopped")},
|
||||
{BitTorrent::TorrentState::StoppedUploading, tr("Completed")},
|
||||
{BitTorrent::TorrentState::Moving, tr("Moving", "Torrent local data are being moved/relocated")},
|
||||
{BitTorrent::TorrentState::MissingFiles, tr("Missing Files")},
|
||||
{BitTorrent::TorrentState::Error, tr("Errored", "Torrent status, the torrent has an error")}
|
||||
|
@ -134,8 +134,8 @@ TransferListModel::TransferListModel(QObject *parent)
|
|||
|
||||
connect(Session::instance(), &Session::torrentFinished, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
connect(Session::instance(), &Session::torrentMetadataReceived, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
connect(Session::instance(), &Session::torrentResumed, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
connect(Session::instance(), &Session::torrentPaused, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
connect(Session::instance(), &Session::torrentStarted, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
connect(Session::instance(), &Session::torrentStopped, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
connect(Session::instance(), &Session::torrentFinishedChecking, this, &TransferListModel::handleTorrentStatusUpdated);
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ QVariant TransferListModel::headerData(const int section, const Qt::Orientation
|
|||
case TR_NAME: return tr("Name", "i.e: torrent name");
|
||||
case TR_SIZE: return tr("Size", "i.e: torrent size");
|
||||
case TR_PROGRESS: return tr("Progress", "% Done");
|
||||
case TR_STATUS: return tr("Status", "Torrent status (e.g. downloading, seeding, paused)");
|
||||
case TR_STATUS: return tr("Status", "Torrent status (e.g. downloading, seeding, stopped)");
|
||||
case TR_SEEDS: return tr("Seeds", "i.e. full sources (often untranslated)");
|
||||
case TR_PEERS: return tr("Peers", "i.e. partial sources (often untranslated)");
|
||||
case TR_DLSPEED: return tr("Down Speed", "i.e: Download speed");
|
||||
|
@ -180,7 +180,7 @@ QVariant TransferListModel::headerData(const int section, const Qt::Orientation
|
|||
case TR_AMOUNT_DOWNLOADED_SESSION: return tr("Session Download", "Amount of data downloaded since program open (e.g. in MB)");
|
||||
case TR_AMOUNT_UPLOADED_SESSION: return tr("Session Upload", "Amount of data uploaded since program open (e.g. in MB)");
|
||||
case TR_AMOUNT_LEFT: return tr("Remaining", "Amount of data left to download (e.g. in MB)");
|
||||
case TR_TIME_ELAPSED: return tr("Time Active", "Time (duration) the torrent is active (not paused)");
|
||||
case TR_TIME_ELAPSED: return tr("Time Active", "Time (duration) the torrent is active (not stopped)");
|
||||
case TR_SAVE_PATH: return tr("Save Path", "Torrent save path");
|
||||
case TR_DOWNLOAD_PATH: return tr("Incomplete Save Path", "Torrent incomplete save path");
|
||||
case TR_COMPLETED: return tr("Completed", "Amount of data completed (e.g. in MB)");
|
||||
|
@ -235,8 +235,8 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
|
|||
bool hideValues = false;
|
||||
if (m_hideZeroValuesMode == HideZeroValuesMode::Always)
|
||||
hideValues = true;
|
||||
else if (m_hideZeroValuesMode == HideZeroValuesMode::Paused)
|
||||
hideValues = (torrent->state() == BitTorrent::TorrentState::PausedDownloading);
|
||||
else if (m_hideZeroValuesMode == HideZeroValuesMode::Stopped)
|
||||
hideValues = (torrent->state() == BitTorrent::TorrentState::StoppedDownloading);
|
||||
|
||||
const auto availabilityString = [hideValues](const qreal value) -> QString
|
||||
{
|
||||
|
@ -683,7 +683,7 @@ void TransferListModel::configure()
|
|||
if (pref->getHideZeroValues())
|
||||
{
|
||||
if (pref->getHideZeroComboValues() == 1)
|
||||
hideZeroValuesMode = HideZeroValuesMode::Paused;
|
||||
hideZeroValuesMode = HideZeroValuesMode::Stopped;
|
||||
else
|
||||
hideZeroValuesMode = HideZeroValuesMode::Always;
|
||||
}
|
||||
|
@ -705,7 +705,7 @@ void TransferListModel::loadUIThemeResources()
|
|||
m_downloadingIcon = themeManager->getIcon(u"downloading"_s);
|
||||
m_errorIcon = themeManager->getIcon(u"error"_s);
|
||||
m_movingIcon = themeManager->getIcon(u"set-location"_s);
|
||||
m_pausedIcon = themeManager->getIcon(u"stopped"_s, u"media-playback-pause"_s);
|
||||
m_stoppedIcon = themeManager->getIcon(u"stopped"_s, u"media-playback-pause"_s);
|
||||
m_queuedIcon = themeManager->getIcon(u"queued"_s);
|
||||
m_stalledDLIcon = themeManager->getIcon(u"stalledDL"_s);
|
||||
m_stalledUPIcon = themeManager->getIcon(u"stalledUP"_s);
|
||||
|
@ -728,9 +728,9 @@ QIcon TransferListModel::getIconByState(const BitTorrent::TorrentState state) co
|
|||
case BitTorrent::TorrentState::Uploading:
|
||||
case BitTorrent::TorrentState::ForcedUploading:
|
||||
return m_uploadingIcon;
|
||||
case BitTorrent::TorrentState::PausedDownloading:
|
||||
return m_pausedIcon;
|
||||
case BitTorrent::TorrentState::PausedUploading:
|
||||
case BitTorrent::TorrentState::StoppedDownloading:
|
||||
return m_stoppedIcon;
|
||||
case BitTorrent::TorrentState::StoppedUploading:
|
||||
return m_completedIcon;
|
||||
case BitTorrent::TorrentState::QueuedDownloading:
|
||||
case BitTorrent::TorrentState::QueuedUploading:
|
||||
|
|
|
@ -128,7 +128,7 @@ private:
|
|||
enum class HideZeroValuesMode
|
||||
{
|
||||
Never,
|
||||
Paused,
|
||||
Stopped,
|
||||
Always
|
||||
};
|
||||
|
||||
|
@ -140,7 +140,7 @@ private:
|
|||
QIcon m_downloadingIcon;
|
||||
QIcon m_errorIcon;
|
||||
QIcon m_movingIcon;
|
||||
QIcon m_pausedIcon;
|
||||
QIcon m_stoppedIcon;
|
||||
QIcon m_queuedIcon;
|
||||
QIcon m_stalledDLIcon;
|
||||
QIcon m_stalledUPIcon;
|
||||
|
|
|
@ -293,11 +293,11 @@ void TransferListWidget::torrentDoubleClicked()
|
|||
|
||||
switch (action)
|
||||
{
|
||||
case TOGGLE_PAUSE:
|
||||
if (torrent->isPaused())
|
||||
torrent->resume();
|
||||
case TOGGLE_STOP:
|
||||
if (torrent->isStopped())
|
||||
torrent->start();
|
||||
else
|
||||
torrent->pause();
|
||||
torrent->stop();
|
||||
break;
|
||||
case PREVIEW_FILE:
|
||||
if (torrentContainsPreviewableFiles(torrent))
|
||||
|
@ -376,66 +376,66 @@ void TransferListWidget::setSelectedTorrentsLocation()
|
|||
fileDialog->open();
|
||||
}
|
||||
|
||||
void TransferListWidget::pauseAllTorrents()
|
||||
void TransferListWidget::stopAllTorrents()
|
||||
{
|
||||
if (Preferences::instance()->confirmPauseAndResumeAll())
|
||||
{
|
||||
// Show confirmation if user would really like to Pause All
|
||||
const QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Confirm pause")
|
||||
, tr("Would you like to pause all torrents?"), (QMessageBox::Yes | QMessageBox::No));
|
||||
// Show confirmation if user would really like to Stop All
|
||||
const QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Confirm stop all torrents")
|
||||
, tr("Would you like to stop all torrents?"), (QMessageBox::Yes | QMessageBox::No));
|
||||
|
||||
if (ret != QMessageBox::Yes)
|
||||
return;
|
||||
}
|
||||
|
||||
for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents()))
|
||||
torrent->pause();
|
||||
torrent->stop();
|
||||
}
|
||||
|
||||
void TransferListWidget::resumeAllTorrents()
|
||||
void TransferListWidget::startAllTorrents()
|
||||
{
|
||||
if (Preferences::instance()->confirmPauseAndResumeAll())
|
||||
{
|
||||
// Show confirmation if user would really like to Resume All
|
||||
const QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Confirm resume")
|
||||
, tr("Would you like to resume all torrents?"), (QMessageBox::Yes | QMessageBox::No));
|
||||
// Show confirmation if user would really like to Start All
|
||||
const QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Confirm start all torrents")
|
||||
, tr("Would you like to start all torrents?"), (QMessageBox::Yes | QMessageBox::No));
|
||||
|
||||
if (ret != QMessageBox::Yes)
|
||||
return;
|
||||
}
|
||||
|
||||
for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents()))
|
||||
torrent->resume();
|
||||
torrent->start();
|
||||
}
|
||||
|
||||
void TransferListWidget::startSelectedTorrents()
|
||||
{
|
||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||
torrent->resume();
|
||||
torrent->start();
|
||||
}
|
||||
|
||||
void TransferListWidget::forceStartSelectedTorrents()
|
||||
{
|
||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||
torrent->resume(BitTorrent::TorrentOperatingMode::Forced);
|
||||
torrent->start(BitTorrent::TorrentOperatingMode::Forced);
|
||||
}
|
||||
|
||||
void TransferListWidget::startVisibleTorrents()
|
||||
{
|
||||
for (BitTorrent::Torrent *const torrent : asConst(getVisibleTorrents()))
|
||||
torrent->resume();
|
||||
torrent->start();
|
||||
}
|
||||
|
||||
void TransferListWidget::pauseSelectedTorrents()
|
||||
void TransferListWidget::stopSelectedTorrents()
|
||||
{
|
||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||
torrent->pause();
|
||||
torrent->stop();
|
||||
}
|
||||
|
||||
void TransferListWidget::pauseVisibleTorrents()
|
||||
void TransferListWidget::stopVisibleTorrents()
|
||||
{
|
||||
for (BitTorrent::Torrent *const torrent : asConst(getVisibleTorrents()))
|
||||
torrent->pause();
|
||||
torrent->stop();
|
||||
}
|
||||
|
||||
void TransferListWidget::softDeleteSelectedTorrents()
|
||||
|
@ -972,11 +972,11 @@ void TransferListWidget::displayListMenu()
|
|||
|
||||
// Create actions
|
||||
|
||||
auto *actionStart = new QAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("&Resume", "Resume/start the torrent"), listMenu);
|
||||
auto *actionStart = new QAction(UIThemeManager::instance()->getIcon(u"torrent-start"_s, u"media-playback-start"_s), tr("&Start", "Resume/start the torrent"), listMenu);
|
||||
connect(actionStart, &QAction::triggered, this, &TransferListWidget::startSelectedTorrents);
|
||||
auto *actionPause = new QAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("&Pause", "Pause the torrent"), listMenu);
|
||||
connect(actionPause, &QAction::triggered, this, &TransferListWidget::pauseSelectedTorrents);
|
||||
auto *actionForceStart = new QAction(UIThemeManager::instance()->getIcon(u"torrent-start-forced"_s, u"media-playback-start"_s), tr("Force Resu&me", "Force Resume/start the torrent"), listMenu);
|
||||
auto *actionStop = new QAction(UIThemeManager::instance()->getIcon(u"torrent-stop"_s, u"media-playback-pause"_s), tr("Sto&p", "Stop the torrent"), listMenu);
|
||||
connect(actionStop, &QAction::triggered, this, &TransferListWidget::stopSelectedTorrents);
|
||||
auto *actionForceStart = new QAction(UIThemeManager::instance()->getIcon(u"torrent-start-forced"_s, u"media-playback-start"_s), tr("Force Star&t", "Force Resume/start the torrent"), listMenu);
|
||||
connect(actionForceStart, &QAction::triggered, this, &TransferListWidget::forceStartSelectedTorrents);
|
||||
auto *actionDelete = new QAction(UIThemeManager::instance()->getIcon(u"list-remove"_s), tr("&Remove", "Remove the torrent"), listMenu);
|
||||
connect(actionDelete, &QAction::triggered, this, &TransferListWidget::softDeleteSelectedTorrents);
|
||||
|
@ -1029,8 +1029,8 @@ void TransferListWidget::displayListMenu()
|
|||
connect(actionExportTorrent, &QAction::triggered, this, &TransferListWidget::exportTorrent);
|
||||
// End of actions
|
||||
|
||||
// Enable/disable pause/start action given the DL state
|
||||
bool needsPause = false, needsStart = false, needsForce = false, needsPreview = false;
|
||||
// Enable/disable stop/start action given the DL state
|
||||
bool needsStop = false, needsStart = false, needsForce = false, needsPreview = false;
|
||||
bool allSameSuperSeeding = true;
|
||||
bool superSeedingMode = false;
|
||||
bool allSameSequentialDownloadMode = true, allSamePrioFirstlast = true;
|
||||
|
@ -1048,10 +1048,9 @@ void TransferListWidget::displayListMenu()
|
|||
|
||||
for (const QModelIndex &index : selectedIndexes)
|
||||
{
|
||||
// Get the file name
|
||||
// Get handle and pause the torrent
|
||||
const BitTorrent::Torrent *torrent = m_listModel->torrentHandle(mapToSource(index));
|
||||
if (!torrent) continue;
|
||||
if (!torrent)
|
||||
continue;
|
||||
|
||||
if (firstCategory.isEmpty() && first)
|
||||
firstCategory = torrent->category();
|
||||
|
@ -1108,11 +1107,11 @@ void TransferListWidget::displayListMenu()
|
|||
else
|
||||
needsStart = true;
|
||||
|
||||
const bool isPaused = torrent->isPaused();
|
||||
if (isPaused)
|
||||
const bool isStopped = torrent->isStopped();
|
||||
if (isStopped)
|
||||
needsStart = true;
|
||||
else
|
||||
needsPause = true;
|
||||
needsStop = true;
|
||||
|
||||
if (torrent->isErrored() || torrent->hasMissingFiles())
|
||||
{
|
||||
|
@ -1136,17 +1135,17 @@ void TransferListWidget::displayListMenu()
|
|||
if (rechecking)
|
||||
{
|
||||
needsStart = true;
|
||||
needsPause = true;
|
||||
needsStop = true;
|
||||
}
|
||||
|
||||
const bool queued = (BitTorrent::Session::instance()->isQueueingSystemEnabled() && torrent->isQueued());
|
||||
|
||||
if (!isPaused && !rechecking && !queued)
|
||||
if (!isStopped && !rechecking && !queued)
|
||||
oneCanForceReannounce = true;
|
||||
|
||||
if (oneHasMetadata && oneNotFinished && !allSameSequentialDownloadMode
|
||||
&& !allSamePrioFirstlast && !allSameSuperSeeding && !allSameCategory
|
||||
&& needsStart && needsForce && needsPause && needsPreview && !allSameAutoTMM
|
||||
&& needsStart && needsForce && needsStop && needsPreview && !allSameAutoTMM
|
||||
&& hasInfohashV1 && hasInfohashV2 && oneCanForceReannounce)
|
||||
{
|
||||
break;
|
||||
|
@ -1155,8 +1154,8 @@ void TransferListWidget::displayListMenu()
|
|||
|
||||
if (needsStart)
|
||||
listMenu->addAction(actionStart);
|
||||
if (needsPause)
|
||||
listMenu->addAction(actionPause);
|
||||
if (needsStop)
|
||||
listMenu->addAction(actionStop);
|
||||
if (needsForce)
|
||||
listMenu->addAction(actionForceStart);
|
||||
listMenu->addSeparator();
|
||||
|
@ -1268,12 +1267,12 @@ void TransferListWidget::displayListMenu()
|
|||
listMenu->addSeparator();
|
||||
if (oneHasMetadata)
|
||||
listMenu->addAction(actionForceRecheck);
|
||||
// We can not force reannounce torrents that are paused/errored/checking/missing files/queued.
|
||||
// We can not force reannounce torrents that are stopped/errored/checking/missing files/queued.
|
||||
// We may already have the tracker list from magnet url. So we can force reannounce torrents without metadata anyway.
|
||||
listMenu->addAction(actionForceReannounce);
|
||||
actionForceReannounce->setEnabled(oneCanForceReannounce);
|
||||
if (!oneCanForceReannounce)
|
||||
actionForceReannounce->setToolTip(tr("Can not force reannounce if torrent is Paused/Queued/Errored/Checking"));
|
||||
actionForceReannounce->setToolTip(tr("Can not force reannounce if torrent is Stopped/Queued/Errored/Checking"));
|
||||
listMenu->addSeparator();
|
||||
listMenu->addAction(actionOpenDestinationFolder);
|
||||
if (BitTorrent::Session::instance()->isQueueingSystemEnabled() && oneNotFinished)
|
||||
|
|
|
@ -68,13 +68,13 @@ public slots:
|
|||
void removeSelectionTag(const Tag &tag);
|
||||
void clearSelectionTags();
|
||||
void setSelectedTorrentsLocation();
|
||||
void pauseAllTorrents();
|
||||
void resumeAllTorrents();
|
||||
void stopAllTorrents();
|
||||
void startAllTorrents();
|
||||
void startSelectedTorrents();
|
||||
void forceStartSelectedTorrents();
|
||||
void startVisibleTorrents();
|
||||
void pauseSelectedTorrents();
|
||||
void pauseVisibleTorrents();
|
||||
void stopSelectedTorrents();
|
||||
void stopVisibleTorrents();
|
||||
void softDeleteSelectedTorrents();
|
||||
void permDeleteSelectedTorrents();
|
||||
void deleteSelectedTorrents(bool deleteLocalFiles);
|
||||
|
|
|
@ -76,8 +76,8 @@ inline QHash<QString, UIThemeColor> defaultUIThemeColors()
|
|||
{u"TransferList.CheckingDownloading"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.CheckingUploading"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.CheckingResumeData"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.PausedDownloading"_s, {Color::Primer::Light::fgMuted, Color::Primer::Dark::fgMuted}},
|
||||
{u"TransferList.PausedUploading"_s, {Color::Primer::Light::doneFg, Color::Primer::Dark::doneFg}},
|
||||
{u"TransferList.StoppedDownloading"_s, {Color::Primer::Light::fgMuted, Color::Primer::Dark::fgMuted}},
|
||||
{u"TransferList.StoppedUploading"_s, {Color::Primer::Light::doneFg, Color::Primer::Dark::doneFg}},
|
||||
{u"TransferList.Moving"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.MissingFiles"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"TransferList.Error"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}}
|
||||
|
@ -132,6 +132,8 @@ inline QSet<QString> defaultUIThemeIcons()
|
|||
u"network-connect"_s,
|
||||
u"network-server"_s,
|
||||
u"object-locked"_s,
|
||||
u"pause-session"_s,
|
||||
u"paused"_s,
|
||||
u"peers"_s,
|
||||
u"peers-add"_s,
|
||||
u"peers-remove"_s,
|
||||
|
|
|
@ -314,6 +314,8 @@
|
|||
<file>network-connect.svg</file>
|
||||
<file>network-server.svg</file>
|
||||
<file>object-locked.svg</file>
|
||||
<file>pause-session.svg</file>
|
||||
<file>paused.svg</file>
|
||||
<file>peers-add.svg</file>
|
||||
<file>peers-remove.svg</file>
|
||||
<file>peers.svg</file>
|
||||
|
|
1
src/icons/pause-session.svg
Normal 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 |
1
src/icons/paused.svg
Normal 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 |
|
@ -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 |
|
@ -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 |
|
@ -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))
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
1
src/webui/www/private/images/pause-session.svg
Normal 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 |
1
src/webui/www/private/images/paused.svg
Normal 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 |
|
@ -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 |
|
@ -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 |
|
@ -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">
|
||||
|
|
|
@ -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]');
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
start: function(element, ref) {
|
||||
startFN();
|
||||
},
|
||||
pause: function(element, ref) {
|
||||
pauseFN();
|
||||
stop: function(element, ref) {
|
||||
stopFN();
|
||||
},
|
||||
forceStart: function(element, ref) {
|
||||
setForceStartFN();
|
||||
|
|
|
@ -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>
|
||||
|
|