Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Update deprecated rTorrent commands #82

Merged
merged 1 commit into from
Jul 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/models/ClientRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class ClientRequest {

createDirectoryMethodCall(options) {
this.requests.push(
this.getMethodCall('execute', ['mkdir', '-p', options.path])
this.getMethodCall('execute2', ['mkdir', '-p', options.path])
);
}

Expand Down Expand Up @@ -270,7 +270,7 @@ class ClientRequest {
let hashes = this.getEnsuredArray(options.hashes);

hashes.forEach((hash) => {
this.requests.push(this.getMethodCall('d.set_priority',
this.requests.push(this.getMethodCall('d.priority.set',
[hash, options.priority]));
this.requests.push(this.getMethodCall('d.update_priorities',
[hash]));
Expand Down
52 changes: 26 additions & 26 deletions server/util/clientUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ var clientUtil = {
'd.custom1=',
'd.custom2=',
'd.custom=sch_ignore', // ignore scheduler
'cat="$t.multicall=d.hash=,t.get_url=,cat={@!@}"',
'cat="$t.multicall=d.hash=,t.url=,cat={@!@}"',
'cat="$t.multicall=d.hash=,t.scrape_complete=,cat={@!@}"', // total seeds
'cat="$t.multicall=d.hash=,t.scrape_incomplete=,cat={@!@}"', // total peers
// 'cat=$d.views=',
Expand All @@ -150,11 +150,11 @@ var clientUtil = {
'completedChunks'
],
filePropertyMethods: [
'f.get_path=',
'f.get_path_components=',
'f.get_priority=',
'f.get_size_bytes=',
'f.get_size_chunks=',
'f.path=',
'f.path_components=',
'f.priority=',
'f.size_bytes=',
'f.size_chunks=',
'f.completed_chunks='
],
trackerProperties: [
Expand All @@ -166,12 +166,12 @@ var clientUtil = {
'type'
],
trackerPropertyMethods: [
't.get_group=',
't.get_url=',
't.get_id=',
't.get_min_interval=',
't.get_normal_interval=',
't.get_type='
't.group=',
't.url=',
't.id=',
't.min_interval=',
't.normal_interval=',
't.type='
],
clientProperties: [
'uploadRate',
Expand All @@ -183,12 +183,12 @@ var clientUtil = {
'downloadThrottle'
],
clientPropertyMethods: [
'get_up_rate',
'get_up_total',
'throttle.global_up.rate',
'throttle.global_up.total',
'throttle.global_up.max_rate',

'get_down_rate',
'get_down_total',
'throttle.global_down.rate',
'throttle.global_down.total',
'throttle.global_down.max_rate'
],
peerProperties: [
Expand All @@ -206,16 +206,16 @@ var clientUtil = {
'isIncoming'
],
peerPropertyMethods: [
'p.get_address=',
'p.get_completed_percent=',
'p.get_client_version=',
'p.get_down_rate=',
'p.get_down_total=',
'p.get_up_rate=',
'p.get_up_total=',
'p.get_id=',
'p.get_peer_rate=',
'p.get_peer_total=',
'p.address=',
'p.completed_percent=',
'p.client_version=',
'p.down_rate=',
'p.down_total=',
'p.up_rate=',
'p.up_total=',
'p.id=',
'p.peer_rate=',
'p.peer_total=',
'p.is_encrypted=',
'p.is_incoming='
]
Expand Down
8 changes: 4 additions & 4 deletions server/util/rTorrentPropMap.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const rTorrentPropMap = {
transferData: {
uploadRate: 'get_up_rate',
uploadTotal: 'get_up_total',
uploadRate: 'throttle.global_up.rate',
uploadTotal: 'throttle.global_up.total',
uploadThrottle: 'throttle.global_up.max_rate',
downloadRate: 'get_down_rate',
downloadTotal: 'get_down_total',
downloadRate: 'throttle.global_down.rate',
downloadTotal: 'throttle.global_down.total',
downloadThrottle: 'throttle.global_down.max_rate'
}
};
Expand Down