mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 06:32:29 -06:00
Add "Remove torrent and its files" option to share ratio limiting
This commit is contained in:
@@ -577,9 +577,10 @@
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
<option value="0">QBT_TR(Pause torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
<option value="1">QBT_TR(Remove torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
<option value="3">QBT_TR(Remove torrent and its files)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
<option value="2">QBT_TR(Enable super seeding for torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1660,8 +1661,23 @@
|
||||
$('max_seeding_time_value').setProperty('value', pref.max_seeding_time.toInt());
|
||||
else
|
||||
$('max_seeding_time_value').setProperty('value', 1440);
|
||||
const max_ratio_act = pref.max_ratio_act.toInt();
|
||||
$('max_ratio_act').getChildren('option')[max_ratio_act].setAttribute('selected', '');
|
||||
let maxRatioAct = 0;
|
||||
switch (pref.max_ratio_act.toInt()) {
|
||||
case 0: // Pause
|
||||
default:
|
||||
maxRatioAct = 0;
|
||||
break;
|
||||
case 1: // Remove
|
||||
maxRatioAct = 1;
|
||||
break;
|
||||
case 2: // Enable super seeding
|
||||
maxRatioAct = 3;
|
||||
break;
|
||||
case 3: // Remove torrent and files
|
||||
maxRatioAct = 2;
|
||||
break;
|
||||
}
|
||||
$('max_ratio_act').getChildren('option')[maxRatioAct].setAttribute('selected', '');
|
||||
updateMaxRatioTimeEnabled();
|
||||
|
||||
// Add trackers
|
||||
|
||||
Reference in New Issue
Block a user