mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 13:41:26 -07:00
Add option to stop seeding when torrent has been inactive
PR #19294. Closes #533. Closes #8073. Closes #15939.
This commit is contained in:
parent
f99a98306d
commit
35e18498d9
26 changed files with 393 additions and 79 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue