mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +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()));
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1552,10 +1556,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
|
||||||
|
@ -2455,9 +2455,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>
|
||||||
@ -2501,6 +2498,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">
|
||||||
@ -2515,9 +2517,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…
Reference in New Issue
Block a user