mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Add option to stop seeding when torrent has been inactive
PR #19294. Closes #533. Closes #8073. Closes #15939.
This commit is contained in:
@@ -258,6 +258,8 @@ void AppController::preferencesAction()
|
||||
data[u"max_ratio"_s] = session->globalMaxRatio();
|
||||
data[u"max_seeding_time_enabled"_s] = (session->globalMaxSeedingMinutes() >= 0.);
|
||||
data[u"max_seeding_time"_s] = session->globalMaxSeedingMinutes();
|
||||
data[u"max_inactive_seeding_time_enabled"_s] = (session->globalMaxInactiveSeedingMinutes() >= 0.);
|
||||
data[u"max_inactive_seeding_time"_s] = session->globalMaxInactiveSeedingMinutes();
|
||||
data[u"max_ratio_act"_s] = session->maxRatioAction();
|
||||
// Add trackers
|
||||
data[u"add_trackers_enabled"_s] = session->isAddTrackersEnabled();
|
||||
@@ -739,6 +741,11 @@ void AppController::setPreferencesAction()
|
||||
else
|
||||
session->setGlobalMaxSeedingMinutes(-1);
|
||||
}
|
||||
if (hasKey(u"max_inactive_seeding_time_enabled"_s))
|
||||
{
|
||||
session->setGlobalMaxInactiveSeedingMinutes(it.value().toBool()
|
||||
? m[u"max_inactive_seeding_time"_s].toInt() : -1);
|
||||
}
|
||||
if (hasKey(u"max_ratio_act"_s))
|
||||
session->setMaxRatioAction(static_cast<MaxRatioAction>(it.value().toInt()));
|
||||
// Add trackers
|
||||
|
||||
Reference in New Issue
Block a user