mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
Merge pull request #7475 from thalieht/ratiosuperseed
Add option to enable Super Seeding mode once ratio/time limit is reached. Closes #7160.
This commit is contained in:
commit
767f024585
@ -1535,10 +1535,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;
|
||||
}
|
||||
}
|
||||
@ -1558,10 +1562,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
|
||||
|
@ -2443,9 +2443,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>
|
||||
@ -2489,6 +2486,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">
|
||||
@ -2503,9 +2505,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…
x
Reference in New Issue
Block a user