mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Enable Super Seeding mode once ratio/time limit is reached
This commit is contained in:
parent
c65c40a5cb
commit
1f6f1716ad
@ -1529,10 +1529,14 @@ void Session::processShareLimits()
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Removed.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash());
|
||||
}
|
||||
else if (!torrent->isPaused()) {
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
|
||||
torrent->pause();
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Paused.").arg(torrent->name()));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding()) {
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Enabled super seeding for it.").arg(torrent->name()));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -1552,10 +1556,14 @@ void Session::processShareLimits()
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash());
|
||||
}
|
||||
else if (!torrent->isPaused()) {
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
|
||||
torrent->pause();
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Paused.").arg(torrent->name()));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding()) {
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Enabled super seeding for it.").arg(torrent->name()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,8 @@ class ResumeDataSavingManager;
|
||||
enum MaxRatioAction
|
||||
{
|
||||
Pause,
|
||||
Remove
|
||||
Remove,
|
||||
EnableSuperSeeding
|
||||
};
|
||||
|
||||
enum TorrentExportFolder
|
||||
|
@ -2455,9 +2455,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string extracomment="minutes"> min</string>
|
||||
</property>
|
||||
@ -2501,6 +2498,11 @@
|
||||
<string>Remove them</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enable super seeding for them</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -2515,9 +2517,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignHCenter</set>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9998.000000000000000</double>
|
||||
</property>
|
||||
|
@ -579,6 +579,7 @@
|
||||
<select id="max_ratio_act">
|
||||
<option value="0">QBT_TR(Pause them)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
<option value="1">QBT_TR(Remove them)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
<option value="2">QBT_TR(Enable super seeding for them)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user