Add WebUI Force Reannounce option

This commit is contained in:
Thomas Piccirello
2018-07-22 20:33:17 -04:00
parent 17405dfc10
commit cdad0dc7d3
5 changed files with 27 additions and 0 deletions

View File

@@ -127,6 +127,7 @@
<li class="separator"><a href="#SequentialDownload"><img src="theme/checked" alt="QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#FirstLastPiecePrio"><img src="theme/checked" alt="QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li class="separator"><a href="#ForceRecheck"><img src="theme/document-edit-verify" alt="QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li><a href="#ForceReannounce"><img src="theme/document-edit-verify" alt="QBT_TR(Force reannounce)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force reannounce)QBT_TR[CONTEXT=TransferListWidget]</a></li>
<li id="queueingMenuItems" class="separator">
<a href="#priority" class="arrow-right"><span style="display: inline-block; width:16px"></span> QBT_TR(Priority)QBT_TR[CONTEXT=TransferListWidget]</a>
<ul>

View File

@@ -400,6 +400,20 @@ initializeWindows = function() {
}
};
reannounceFN = function() {
var hashes = torrentsTable.selectedRowsIds();
if (hashes.length) {
new Request({
url: 'api/v2/torrents/reannounce',
method: 'post',
data: {
hashes: hashes.join("|"),
}
}).send();
updateMainData();
}
};
setLocationFN = function() {
var hashes = torrentsTable.selectedRowsIds();
if (hashes.length) {

View File

@@ -78,6 +78,9 @@
ForceRecheck: function(element, ref) {
recheckFN();
},
ForceReannounce: function(element, ref) {
reannounceFN();
},
SuperSeeding: function(element, ref) {
setSuperSeedingFN(!ref.getItemChecked('SuperSeeding'));