Skip to content
Open
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
21 changes: 21 additions & 0 deletions js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,27 @@ function correctContent()
"load" : { name: "load.normal", prm: 1 }
});
}
if(theWebUI.systemInfo.rTorrent.iVersion>=0x1002)
{
$.extend(theRequestManager.aliases,
{
"dht" : { name: "dht.mode.set", prm: 1 },
"throttle.max_uploads.div" : { name: "throttle.max_uploads.div._val", prm: 1 },
"throttle.max_uploads.global" : { name: "throttle.max_uploads.global._val", prm: 1 },
"throttle.max_downloads.div" : { name: "throttle.max_downloads.div._val", prm: 1 },
"throttle.max_downloads.global" : { name: "throttle.max_downloads.global._val", prm: 1 },
"ratio.enable" : { name: "group.seeding.ratio.enable", prm: 1 },
"ratio.disable" : { name: "group.seeding.ratio.disable", prm: 1 },
"ratio.min" : { name: "group2.seeding.ratio.min", prm: 0 },
"ratio.max" : { name: "group2.seeding.ratio.max", prm: 0 },
"ratio.upload" : { name: "group2.seeding.ratio.upload", prm: 0 },
"ratio.min.set" : { name: "group2.seeding.ratio.min.set", prm: 1 },
"ratio.max.set" : { name: "group2.seeding.ratio.max.set", prm: 1 },
"ratio.upload.set" : { name: "group2.seeding.ratio.upload.set", prm: 1 },
"connection_leech" : { name: "protocol.connection.leech.set", prm: 1 },
"connection_seed" : { name: "protocol.connection.seed.set", prm: 1 },
});
}
if(theWebUI.systemInfo.rTorrent.iVersion < 0x907) {
const title = theUILang.requiresAtLeastRtorrent.replace('{version}', 'v0.9.7');
$($$('webui.show_open_status')).attr({ disabled: '', title });
Expand Down
3 changes: 2 additions & 1 deletion js/rtorrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ rTorrentStub.prototype.setsettings = function()
else
prm = "auto";
prmType = "string";
cmd = new rXMLRPCCommand('dht');
cmd = new rXMLRPCCommand('dht.mode.set');
cmd.addParameter("string",'');
}
else
cmd = new rXMLRPCCommand('set_'+this.ss[i].substr(1));
Expand Down
19 changes: 19 additions & 0 deletions php/methods-0.10.2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

$this->aliases = array_merge($this->aliases,array(
"dht" => array( "name"=>"dht.mode.set", "prm"=>1 ),
"throttle.max_uploads.div" => array( "name"=>"throttle.max_uploads.div._val", "prm"=>1 ),
"throttle.max_uploads.global" => array( "name"=>"throttle.max_uploads.global._val", "prm"=>1 ),
"throttle.max_downloads.div" => array( "name"=>"throttle.max_downloads.div._val", "prm"=>1 ),
"throttle.max_downloads.global" => array( "name"=>"throttle.max_downloads.global._val", "prm"=>1 ),
"ratio.enable" => array( "name"=>"group.seeding.ratio.enable", "prm"=>1 ),
"ratio.disable" => array( "name"=>"group.seeding.ratio.disable", "prm"=>1 ),
"ratio.min" => array( "name"=>"group2.seeding.ratio.min", "prm"=>0 ),
"ratio.max" => array( "name"=>"group2.seeding.ratio.max", "prm"=>0 ),
"ratio.upload" => array( "name"=>"group2.seeding.ratio.upload", "prm"=>0 ),
"ratio.min.set" => array( "name"=>"group2.seeding.ratio.min.set", "prm"=>1 ),
"ratio.max.set" => array( "name"=>"group2.seeding.ratio.max.set", "prm"=>1 ),
"ratio.upload.set" => array( "name"=>"group2.seeding.ratio.upload.set", "prm"=>1 ),
"connection_leech" => array( "name"=>"protocol.connection.leech.set", "prm"=>1 ),
"connection_seed" => array( "name"=>"protocol.connection.seed.set", "prm"=>1 ),
));
10 changes: 8 additions & 2 deletions php/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ public function obtain()
{
require_once( 'methods-0.9.4.php' );
}

if($this->iVersion>=0x1002)
{
require_once( 'methods-0.10.2.php' );
}
$this->apiVersion = 0;
if($this->iVersion>=0x901)
{
Expand All @@ -230,7 +233,10 @@ public function obtain()
$this->apiVersion = $req->val[0];
}

$req = new rXMLRPCRequest( new rXMLRPCCommand("to_kb", floatval(1024)) );
$req = new rXMLRPCRequest(new rXMLRPCCommand(
"convert.kb",
array('',floatval(1024))
));
if($req->run())
{
if(!$req->fault)
Expand Down