mirror of
https://github.com/transmission/transmission.git
synced 2026-04-28 12:44:15 +01:00
#5944: Unify indentation style and strip trailing whitespaces across JS code, no functional changes (patch by xzcvczx + a lot more)
This commit is contained in:
@@ -54,8 +54,8 @@ TransmissionRemote.prototype =
|
||||
}
|
||||
|
||||
remote._error = request.responseText
|
||||
? request.responseText.trim().replace(/(<([^>]+)>)/ig,"")
|
||||
: "";
|
||||
? request.responseText.trim().replace(/(<([^>]+)>)/ig,"")
|
||||
: "";
|
||||
if (!remote._error.length)
|
||||
remote._error = 'Server not responding';
|
||||
|
||||
@@ -101,17 +101,20 @@ TransmissionRemote.prototype =
|
||||
var o = { method: 'session-get' };
|
||||
this.sendRequest(o, callback, context, async);
|
||||
},
|
||||
|
||||
|
||||
checkPort: function(callback, context, async) {
|
||||
var o = { method: 'port-test' };
|
||||
this.sendRequest(o, callback, context, async);
|
||||
},
|
||||
|
||||
renameTorrent: function(torrentIds, oldpath, newname, callback, context) {
|
||||
var o = { method: 'torrent-rename-path',
|
||||
arguments: { 'ids': torrentIds,
|
||||
'path': oldpath,
|
||||
'name': newname }
|
||||
var o = {
|
||||
method: 'torrent-rename-path',
|
||||
arguments: {
|
||||
'ids': torrentIds,
|
||||
'path': oldpath,
|
||||
'name': newname
|
||||
}
|
||||
};
|
||||
this.sendRequest(o, callback, context);
|
||||
},
|
||||
@@ -124,7 +127,7 @@ TransmissionRemote.prototype =
|
||||
updateTorrents: function(torrentIds, fields, callback, context) {
|
||||
var o = {
|
||||
method: 'torrent-get',
|
||||
'arguments': {
|
||||
arguments: {
|
||||
'fields': fields
|
||||
}
|
||||
};
|
||||
@@ -184,7 +187,7 @@ TransmissionRemote.prototype =
|
||||
|
||||
moveTorrents: function(torrent_ids, new_location, callback, context) {
|
||||
var remote = this;
|
||||
this.sendTorrentSetRequests( 'torrent-set-location', torrent_ids,
|
||||
this.sendTorrentSetRequests( 'torrent-set-location', torrent_ids,
|
||||
{"move": true, "location": new_location}, callback, context);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user