cajainas Posted March 26, 2013 Report Share Posted March 26, 2013 In windows it's too easy (download utorrent adder, configure, and ready), but I find the way to send magnet links to utserver from a remote pc in GNU/Linux (Mint 14 in my case)I think that dependencies are: python (>2.6.6) and python-libtorrent- Download utwhisper from https://github.com/tranqil/utwhisper and extract in a folder ("~/magnet" in my case)- Configure settings.py (user,pass and server url).Optional: If you write in the console "python ~/magnet/utwhisper --addurl magneturl", you will add the magnet to your utserver. But forget this, we want to automate this (you can see the funcionalities of this program writing "python utwhisper --help")Now, the way to handle magnets, using chrome is:Open a console and write:$ gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "python /home/YOURUSER/FOLDER/utwhisper.py --addurl %s"$ gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool $ gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true Now, if you click in a magnet, chrome will ask you if do you want a external application to handle the magnet protocol, press ok (and check on the remember option) and the torrent will download in your remote utserver.Apologies for my bad english Link to comment Share on other sites More sharing options...
Firexi Posted April 3, 2014 Report Share Posted April 3, 2014 thank Link to comment Share on other sites More sharing options...
Firon Posted April 3, 2014 Report Share Posted April 3, 2014 https://github.com/bittorrent/btc BTC is a more recommended tool for commandline operations. Link to comment Share on other sites More sharing options...
IamC8 Posted April 18, 2014 Report Share Posted April 18, 2014 This also works well, have been using my script for a while now.Just change myCRED="admin:" andmyURL="https://server:8080/gui/" below #!/bin/bash## do_GetToken() {echo "Getting token."curl -s \--connect-timeout 20 --max-time 60 \--trace $logNAME".trace" \--insecure \--user $myCRED \--cookie-jar $logNAME".cj" \--output $logNAME".of" \$myURL"token.html" if [ -e $logNAME".of" ]thenmyTOKEN=`cat $logNAME".of" |sed 's/<[^<>]*>//g'`if [ -z "$myTOKEN" ]thenecho "Problem with Token, exiting"exit 1elseecho "Good token."echo "Token obtained: "$myTOKEN >> $myLOGSfielseclearecho "Error connecting!"exitfi} do_PostTo() {echo "Posting magnetic link."curl -G -s \--user-agent "blah blah" \--user $myCRED \--insecure \--trace $logNAME".trace" \--connect-timeout 20 --max-time 60 \--cookie $logNAME".cj" \--dump-header $logNAME".dh" \--output $logNAME".of" \--data token=$myTOKEN \--data action=add-url \--data-urlencode s=$magnetLink \$myURL checkRes=`cat $logNAME".of" |grep "build"`if [ -z "$checkRes" ]thenecho "Problem ???"elseecho "Finished." fi } clearme=`basename $0`logNAME="/tmp/$me.log"rm -f "$logNAME""*"myLOGS="$logNAME"".mylogs"myCRED="admin:"myURL="https://server:8080/gui/"rm -f $logNAME".of"magnetList="/tmp/magnetList"cat <<EOF> $magnetListmagnet:?xt=urn:btih:757b25d9681d493167b8d3759dbfddc983e80646&dn=ubuntu-14.04-server-amd64.isoEOF do_GetToken while read magnetLinkdodo_PostTodone < $magnetList Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.