This snippet adds the stopall/startall command to RTgui, you can call it via http://hostname/control.php?cmd=startall GET request and integrate it, like me, the Torrent download with the home automation system (ie VantageControls InFusion system via UselessAngelo.Generic HTTP Client driver). In this way I stop the BitTorrent client when I power on the TV set and restart it when power off the TV or arm the burgalarm system.
Last active
July 24, 2016 14:49
-
-
Save angeloxx/81ad7b4fef730cbb51d70a0d08971b35 to your computer and use it in GitHub Desktop.
RTgui start/stop all rtorrent downloads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- control.php.old 2016-07-24 15:55:48.052000000 +0200 | |
+++ control.php 2016-07-24 15:35:04.992000000 +0200 | |
@@ -116,6 +116,12 @@ | |
case "delete": | |
$response = do_xmlrpc(xmlrpc_encode_request("d.erase",array("$r_hash"))); | |
break; | |
+ case "startall": | |
+ $response = do_xmlrpc(xmlrpc_encode_request("d.multicall",array("","d.start="))); | |
+ break; | |
+ case "stopall": | |
+ $response = do_xmlrpc(xmlrpc_encode_request("d.multicall",array("","d.stop="))); | |
+ break; | |
case "hashcheck": | |
$response = do_xmlrpc(xmlrpc_encode_request("d.check_hash",array("$r_hash"))); | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment