mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +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()));
|
LogMsg(tr("'%1' reached the maximum ratio you set. Removed.").arg(torrent->name()));
|
||||||
deleteTorrent(torrent->hash());
|
deleteTorrent(torrent->hash());
|
||||||
}
|
}
|
||||||
else if (!torrent->isPaused()) {
|
else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
|
||||||
torrent->pause();
|
torrent->pause();
|
||||||
LogMsg(tr("'%1' reached the maximum ratio you set. Paused.").arg(torrent->name()));
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1558,10 +1562,14 @@ void Session::processShareLimits()
|
|||||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed.").arg(torrent->name()));
|
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed.").arg(torrent->name()));
|
||||||
deleteTorrent(torrent->hash());
|
deleteTorrent(torrent->hash());
|
||||||
}
|
}
|
||||||
else if (!torrent->isPaused()) {
|
else if ((m_maxRatioAction == Pause) && !torrent->isPaused()) {
|
||||||
torrent->pause();
|
torrent->pause();
|
||||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Paused.").arg(torrent->name()));
|
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
|
enum MaxRatioAction
|
||||||
{
|
{
|
||||||
Pause,
|
Pause,
|
||||||
Remove
|
Remove,
|
||||||
|
EnableSuperSeeding
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TorrentExportFolder
|
enum TorrentExportFolder
|
||||||
|
@ -2443,9 +2443,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string extracomment="minutes"> min</string>
|
<string extracomment="minutes"> min</string>
|
||||||
</property>
|
</property>
|
||||||
@ -2489,6 +2486,11 @@
|
|||||||
<string>Remove them</string>
|
<string>Remove them</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable super seeding for them</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
@ -2503,9 +2505,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignHCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<double>9998.000000000000000</double>
|
<double>9998.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
|
@ -579,6 +579,7 @@
|
|||||||
<select id="max_ratio_act">
|
<select id="max_ratio_act">
|
||||||
<option value="0">QBT_TR(Pause them)QBT_TR[CONTEXT=OptionsDialog]</option>
|
<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="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>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user