Skip to content

Instantly share code, notes, and snippets.

@jasonm23
Forked from jonfuller/status.json
Last active May 22, 2018 23:58
Show Gist options
  • Select an option

  • Save jasonm23/4a5d6d8abd0184e9489da5ee47dd1500 to your computer and use it in GitHub Desktop.

Select an option

Save jasonm23/4a5d6d8abd0184e9489da5ee47dd1500 to your computer and use it in GitHub Desktop.

Revisions

  1. jasonm23 revised this gist May 22, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion status.json
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    {
    "arguments": {
    "fields": [ "id", "name", "percentDone", "totalSize", "rateDownload", "rateUpload" ]
    "fields": [ "id", "name", "percentDone" ]
    },
    "method": "torrent-get"
    }
  2. jasonm23 revised this gist May 22, 2018. 2 changed files with 4 additions and 1 deletion.
    1 change: 1 addition & 0 deletions sample .json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    {"arguments":{"torrents":[{"id":5,"name":"60.Minutes.S50E37.1080p.WEB.x264-CookieMonster[rarbg]","percentDone":0.4061},{"id":6,"name":"Elementary.S06E04.1080p.HDTV.X264-DIMENSION[rarbg]","percentDone":0.1815},{"id":7,"name":"Stephen.Colbert.2018.05.21.Zachary.Quinto.1080p.WEB.x264-TBS[rarbg]","percentDone":0.1827}]},"result":"success"}
    4 changes: 3 additions & 1 deletion transmission_rpc.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    curl -H "X-Transmission-Session-Id: SESSIONIDGOESHERE" -d @status.json http://localhost:9091/transmission/rpc | prettify_json.rb
    SESSION=$(curl -si http://localhost:9091/transmission/rpc | grep "X-Transmission-Session-Id: " | head -1 | cut -d' ' -f2)

    curl -H "X-Transmission-Session-Id: $SESSION" -d @status.json http://localhost:9091/transmission/rpc
  3. @jonfuller jonfuller created this gist Jan 20, 2011.
    6 changes: 6 additions & 0 deletions status.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    {
    "arguments": {
    "fields": [ "id", "name", "percentDone", "totalSize", "rateDownload", "rateUpload" ]
    },
    "method": "torrent-get"
    }
    5 changes: 5 additions & 0 deletions stop-all.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    {
    "arguments": {
    },
    "method": "torrent-stop"
    }
    1 change: 1 addition & 0 deletions transmission_rpc.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    curl -H "X-Transmission-Session-Id: SESSIONIDGOESHERE" -d @status.json http://localhost:9091/transmission/rpc | prettify_json.rb