Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanhandley/e64c9dbaa0d52c7d04635fc94250e873 to your computer and use it in GitHub Desktop.
Save seanhandley/e64c9dbaa0d52c7d04635fc94250e873 to your computer and use it in GitHub Desktop.
SESSION=`curl -s -L -I http://raspberrypi:9091/transmission/web | grep X-Transmission-Session-Id | cut -d' ' -f 2 | sed 's/[[:space:]]*$//'`
curl 'http://raspberrypi:9091/transmission/rpc' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.9,fr;q=0.8,ru;q=0.7' -H "X-Transmission-Session-Id: `echo $SESSION`" -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Content-Type: json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: http://raspberrypi:9091/transmission/web/' -H 'DNT: 1' --data-binary '{"method":"torrent-add","arguments":{"paused":false,"download-dir":"/mnt/sda1/New","filename":"'"${URL}"'"}}' --compressed --insecure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment