shutteriop.blogg.se

Transmission torrent complete script
Transmission torrent complete script













Transmission torrent complete script torrent#

The script does not seem to be executing after a torrent completes, I know there are other issues that could be going on aside the from the content of the script itself. "script-torrent-done-filename": "/home/user/script.sh",

transmission torrent complete script

I am using the following relevant settings in /etc/transmission-daemon/settings.json: "download-dir": "/data/transmission/completed", Ignoring."Įcho "* * * * * Operations on torrent ID $TORRENTID completed.I am looking to have the Transmission bittorrent client execute a script that changes the owner and permissions of all torrents in the completed folder when a torrent completes downloading. Transmission-remote -auth=user:password -torrent $TORRENTID -removeĮcho "Torrent #$TORRENTID is not completed. Transmission-remote -auth=user:password -torrent $TORRENTID -move $MOVEDIR STATE_STOPPED=`transmission-remote -auth=user:password -torrent $TORRENTID -info | grep "State: Stopped\|Finished\|Idle"`Įcho "Moving downloaded file(s) to $MOVEDIR." * * * * *"ĭL_COMPLETED=`transmission-remote -auth=user:password -torrent $TORRENTID -info | grep "Percent Done: 100%"` TORRENTLIST=`transmission-remote -auth=user:password -list | sed -e '1d $d s/^ *//' | cut -only-delimited -delimiter=' ' -fields=1`Įcho "* * * * * Operations on torrent ID $TORRENTID starting. Note: I haven't actually test run it but it should work since there is only the changes mentioned here coupled with breaking out the transmission-remote invocation into a variable. $TR_CMD -torrent $TORRENTID -move $MOVEDIR STATE_STOPPED=`$TR_CMD -torrent $TORRENTID -info | grep “State: Stopped\|Finished\|Idle”`

transmission torrent complete script

TORRENTLIST=`$TR_CMD -list | sed -e '1d $d s/^ *//' | cut -only-delimited -delimiter=' ' –fields=1`ĭL_COMPLETED=`$TR_CMD -torrent $TORRENTID -info | grep “Percent Done: 100%”` TR_CMD="transmission-remote -auth=user:pass" # Torrent cmd, transmission-remote and common options, like login. Ignoring.”Įcho “* * * * * Operations on torrent ID $TORRENTID completed. Transmission-remote –torrent $TORRENTID –removeĮcho “Torrent #$TORRENTID is not completed. Transmission-remote –torrent $TORRENTID –move $MOVEDIR # move the files and remove the torrent from TransmissionĮcho “Moving downloaded file(s) to $MOVEDIR.” # if the torrent is “Stopped”, “Finished”, or “Idle” after downloading 100%… STATE_STOPPED=`transmission-remote –torrent $TORRENTID –info | grep “State: Stopped\|Finished\|Idle”` # check torrent’s current state is “Stopped”, “Finished”, or “Idle” * * * * *”ĭL_COMPLETED=`transmission-remote –torrent $TORRENTID –info | grep “Percent Done: 100%”`

transmission torrent complete script

TORRENTLIST=`transmission-remote –list | sed -e ’1d $d s/^ *//’ | cut –only-delimited –delimiter= ” ” –fields=1`Įcho “* * * * * Operations on torrent ID $TORRENTID starting.

transmission torrent complete script

# use cut to get first field from each line # use sed to delete first / last line of output, and remove leading spaces # use transmission-remote to get torrent list from transmission-remote list # …or set MOVEDIR using the first command-line argument MOVEDIR=/home/mjdescy/media # the folder to move completed downloads to # either hard-code the MOVEDIR variable here… # script to check for complete torrents in transmission folder, then stop and move them













Transmission torrent complete script