WebUI: Provide 'Merge trackers to existing torrent' option
Some checks failed
CI - File health / Check (push) Failing after 0s
CI - Python / Check (push) Failing after 0s
CI - Ubuntu / Build (1.2.19, GUI=OFF, 6.5.2) (push) Failing after 0s
CI - Ubuntu / Build (1.2.19, GUI=ON, 6.5.2) (push) Failing after 0s
CI - Ubuntu / Build (2.0.10, GUI=OFF, 6.5.2) (push) Failing after 0s
CI - Ubuntu / Build (2.0.10, GUI=ON, 6.5.2) (push) Failing after 0s
CI - WebUI / Check (push) Failing after 0s
CI - macOS / Build (1.2.19, GUI=OFF, 6.7.0) (push) Has been cancelled
CI - macOS / Build (1.2.19, GUI=ON, 6.7.0) (push) Has been cancelled
CI - macOS / Build (2.0.10, GUI=OFF, 6.7.0) (push) Has been cancelled
CI - macOS / Build (2.0.10, GUI=ON, 6.7.0) (push) Has been cancelled
CI - Windows / Build (1.2.19) (push) Has been cancelled
CI - Windows / Build (2.0.10) (push) Has been cancelled
Stale bot / stale (push) Failing after 0s

PR #21302.
This commit is contained in:
skomerko 2024-09-10 10:12:30 +02:00 committed by GitHub
parent 1b53fdf9ee
commit 435385816a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,6 +117,13 @@
<option value="FilesChecked">QBT_TR(Files checked)QBT_TR[CONTEXT=OptionsDialog]</option>
</select>
</div>
<fieldset class="settings">
<legend>QBT_TR(When duplicate torrent is being added)QBT_TR[CONTEXT=OptionsDialog]</legend>
<div class="formRow">
<input type="checkbox" id="mergeTrackersInput">
<label for="mergeTrackersInput">QBT_TR(Merge trackers to existing torrent)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
</fieldset>
<div class="formRow">
<input type="checkbox" id="deletetorrentfileafter_checkbox">
<label for="deletetorrentfileafter_checkbox">QBT_TR(Delete .torrent files afterwards)QBT_TR[CONTEXT=OptionsDialog]</label>
@ -2136,6 +2143,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
break;
}
$("stopConditionSelect").getChildren("option")[index].selected = true;
document.getElementById("mergeTrackersInput").checked = pref.merge_trackers;
$("deletetorrentfileafter_checkbox").checked = pref.auto_delete_mode;
$("preallocateall_checkbox").checked = pref.preallocate_all;
@ -2526,6 +2534,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
settings["add_to_top_of_queue"] = $("addToTopOfQueueCheckbox").checked;
settings["add_stopped_enabled"] = $("dontstartdownloads_checkbox").checked;
settings["torrent_stop_condition"] = $("stopConditionSelect").getSelected()[0].value;
settings["merge_trackers"] = document.getElementById("mergeTrackersInput").checked;
settings["auto_delete_mode"] = Number($("deletetorrentfileafter_checkbox").checked);
settings["preallocate_all"] = $("preallocateall_checkbox").checked;