Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #for the autodl.cfg part, here are my settings
- [options]
- upload-type = exec
- upload-command = /home99/slash/bin/deluge-console
- upload-args = connect 127.0.0.1:99999 ; "add $(TorrentPathName)" ; quit
- update-check = auto
- save-download-history = true
- max-saved-releases = 1000
- -------------------------------------------------------------------------------
- #Go to the directory you want to save your unregistered torrents error script. For me, I saved it in my files directory
- cd files
- nano autodldeluge.sh
- #(paste the code below)
- -------------------------------------------------------------------------------
- #!/bin/bash
- torrentid=$1
- torrentname=$2
- torrentpath=$3
- x=1
- while [ $x -le 100 ]
- do
- sleep 2
- echo "Running $x times" >> ~/script.log
- echo "TorrentID: $torrentid" >> ~/script.log
- line=$(deluge-console "connect 127.0.0.1:99999; info" $1 | grep "Tracker status")
- echo $line >> ~/script.log
- case "$line" in
- *unregistered*|*Sent*|*End*of*file*|*Bad*Gateway*)
- deluge-console "connect 127.0.0.1:99999; pause '$torrentid'"
- sleep 3
- deluge-console "connect 127.0.0.1:99999; resume '$torrentid'"
- ;;
- *)
- echo "Found working torrent: $torrentname $torrentpath $torrentid" >> ~/script.log
- exit 1;;
- esac
- x=$(( $x + 1 ))
- done
- -------------------------------------------------------------------------------
- #After you saved that file, run this command
- chmod +x autodldeluge.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement