[SCRIPT] move torrent by tracker

Discussion of Transmission that doesn't fit in the other categories
Post Reply
rZn
Posts: 2
Joined: Sun Jul 18, 2010 8:43 am

[SCRIPT] move torrent by tracker

Post by rZn »

Hi
I did some searching for a way to sort my downloaded torrents into folders based by tracker.
Did not find any way to do that (please inform me if there is another way to do this..)

So I myself a ugly hackish little bash script.. but hey it works for me.. :roll: it should work for you to :wink:
I have only tried it with single tracker torrents.

Just change user and pass in the script and enable it in settings.json

Thanks to killemov for his nice rar and cleanup script :D
I did got the idea how to do it from his script.

Code: Select all

#!/bin/bash
    # move_torrent.sh by rZn

      # Username for transmission remote.
      TR_USERNAME="user"
      # Password for transmission remote.
      TR_PASSWORD="pass"

TRACKER=$(transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t$TR_TORRENT_ID -it | sed -n -e '/[:]/p' | awk '{print substr($0, index($0,$3))}' | cut -b8- | cut -d":" -f1)
mkdir -p ${TR_TORRENT_DIR}/${TRACKER}
transmission-remote -n $TR_USERNAME:$TR_PASSWORD -t$TR_TORRENT_ID --move ${TR_TORRENT_DIR}/${TRACKER}

Regards.
//rZn
Last edited by rZn on Sat Dec 17, 2011 8:14 pm, edited 1 time in total.
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: [SCRIPT] move torrent by tracker

Post by blacke4dawn »

You know, you should really edit out your own login info before posting things here. :mrgreen:
rZn
Posts: 2
Joined: Sun Jul 18, 2010 8:43 am

Re: [SCRIPT] move torrent by tracker

Post by rZn »

hehe done.
I did remove it but I'd pasted wrong paste :p
flying_sausages
Posts: 2
Joined: Sun May 03, 2020 2:25 am

Re: [SCRIPT] move torrent by tracker

Post by flying_sausages »

So I found this just now and I made some changes to this.A torrent with multiple trackers would create some pretty bizarre looking folders in the original so I fixed that and use only the first tracker.

https://gist.github.com/flying-sausages ... 5770dd2a80
Post Reply