Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"remove": function(mode) {
if (DialogManager.modalIsVisible()) return;
var count = this.trtTable.selectedRows.length;
if (count == 0) return;
mode = parseInt(mode, 10);
if (isNaN(mode) || mode < 0 || this.delActions.length <= mode)
mode = this.settings["gui.default_del_action"] || 0;
{ // TODO: Remove this once backend support is stable (requires 3.0+)
if (undefined === this.settings["webui.uconnect_enable"]) mode &= ~1; // force non-.torrent removal mode
}
var act = this.perform.bind(this, this.delActions[mode]);
if ([this.settings["confirm_when_deleting"], true].pick()) {
var ask;
switch (mode) {
case CONST.TOR_REMOVE:
case CONST.TOR_REMOVE_TORRENT:
ask = ((count == 1) ? "OV_CONFIRM_DELETE_ONE" : "OV_CONFIRM_DELETE_MULTIPLE");
break;
case CONST.TOR_REMOVE_DATA:
"removeDefault": function(shift) {
this.remove((this.settings["gui.default_del_action"] || 0) | (shift ? 2 : 0));
},
removeTorrent: function() {
var actions = ['remove','removetorrent','removedata','removedatatorrent'];
var defaultRemove = parseInt(torrentServerService.settingsMap['gui.default_del_action'].value);
return torrentServerService.actions()[actions[defaultRemove]];
},
getFileDownloadUrl: function(torrent,file) {
removeTorrent: function() {
var actions = ['remove','removetorrent','removedata','removedatatorrent'];
var defaultRemove = parseInt(torrentServerService.settingsMap['gui.default_del_action'].value);
return torrentServerService.actions()[actions[defaultRemove]];
},
getFileDownloadUrl: function(torrent,file) {