Apply inactive seeding time limit set on new torrents

PR #20231.
Closes #20224.
This commit is contained in:
Vladimir Golovnev 2024-01-05 18:25:29 +03:00 committed by Vladimir Golovnev (Glassez)
parent 77d907c2aa
commit 4c3af5d923
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
2 changed files with 3 additions and 1 deletions

View file

@ -2681,6 +2681,7 @@ LoadTorrentParams SessionImpl::initLoadTorrentParams(const AddTorrentParams &add
loadTorrentParams.addToQueueTop = addTorrentParams.addToQueueTop.value_or(isAddTorrentToQueueTop());
loadTorrentParams.ratioLimit = addTorrentParams.ratioLimit;
loadTorrentParams.seedingTimeLimit = addTorrentParams.seedingTimeLimit;
loadTorrentParams.inactiveSeedingTimeLimit = addTorrentParams.inactiveSeedingTimeLimit;
const QString category = addTorrentParams.category;
if (!category.isEmpty() && !m_categories.contains(category) && !addCategory(category))

View file

@ -285,7 +285,8 @@ TorrentOptionsDialog::TorrentOptionsDialog(QWidget *parent, const QVector<BitTor
const bool useGlobalValue = allSameRatio && allSameSeedingTime
&& (firstTorrentRatio == BitTorrent::Torrent::USE_GLOBAL_RATIO)
&& (firstTorrentSeedingTime == BitTorrent::Torrent::USE_GLOBAL_SEEDING_TIME);
&& (firstTorrentSeedingTime == BitTorrent::Torrent::USE_GLOBAL_SEEDING_TIME)
&& (firstTorrentInactiveSeedingTime == BitTorrent::Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME);
if (!allSameRatio || !allSameSeedingTime || !allSameInactiveSeedingTime)
{