#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:
Mike Gelfand
2015-05-05 19:12:48 +00:00
parent 5de8bbe6d8
commit 7177d43ba1
11 changed files with 1180 additions and 1178 deletions

View File

@@ -108,10 +108,13 @@ TransmissionRemote.prototype =
},
renameTorrent: function(torrentIds, oldpath, newname, callback, context) {
var o = { method: 'torrent-rename-path',
arguments: { 'ids': torrentIds,
var o = {
method: 'torrent-rename-path',
arguments: {
'ids': torrentIds,
'path': oldpath,
'name': newname }
'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
}
};

View File

@@ -420,14 +420,13 @@ Torrent.compareByProgress = function(ta, tb)
return (a - b) || Torrent.compareByRatio(ta, tb);
};
Torrent.compareBySize = function(ta, tb)
{
var a = ta.getTotalSize(),
b = tb.getTotalSize();
return (a - b) || Torrent.compareByName(ta, tb);
}
};
Torrent.compareTorrents = function(a, b, sortMethod, sortDirection)
{