Jump to content
Sign in to follow this  
dhead

transmission_clean.sh : remove finished torrents

4 posts in this topic Last Reply

Recommended Posts

I've decided recently to try Unraid so I installed it on a test machine.

With Influencer's plugins to Transmission, HTPC-Manager, CouchPotato and Sickbeard it took me just few minutes to setup a full working automated download server, amazing !!!

 

I thought I could make this a little bit better.

It wasn't much work as there are enough examples on the web so I didn't need to write this from scratch.

 

This is my private solution and you probably will want it to act a little bit different, my advice is don't be lazy, open the script and try to understand it, it didn't require much for me to customized it and I've got no shell scripting experience.

(yes, I know, this forum is full of system admins but they aren't the target for this thread).

 

 

The idea is to remove torrents only after the seeding period completed (different ratios can be set in CP, SB & Transmission)

After torrent is downloaded it should be moved by SB or CP while continue seeding.

 

Sadly SB can't move the downloaded torrent while keep on seeding so my quick solution was to just remove any downloaded torrents in SB download folder.

 

Recommendations:

* Set different download folders for SB, CP and other torrents.

* Set ratio for pausing torrents.

 

Instructions:

* Download the script transmission_clean.sh from my gist.

* Edit transmission_clean.sh, enter your Transmission's user, password (or if none then leave as it is) and SB download path.

* Create the folder "scripts" on flash and copy the script.

* Connect locally or remotely with ssh and add a cron job.

* That's it.

 

How to add a cron job ?

Follow this forum post or use my example (which based on the post).

My example, just type the following (without preceding #) :

# crontab -l >/tmp/crontab

# echo "# clean transmission every hour:" >>/tmp/crontab

# echo "0 * * * * /boot/scripts/transmission_clean.sh 1> /dev/null" >>/tmp/crontab

# crontab /tmp/crontab

 

Check that your crontab is updated to the changes with "# crontab -l"

 

 

What are the other scripts on my gist ?

I decided that I'm too lazy to check what's going on with my torrents and thought of trying Growl.

The transmission_clean_growl.sh is the same as the above just with Growl support.

 

Instructions for transmission_clean_growl.sh:

* Follow the instructions for transmission_clean.sh and just renamed the file correctly.

* Copy the 2 python scripts also.

* Edit py_torrentgrowl.py, you'll need to enter the target machine ip and Growl password (if exist).

* On first run the script need to register on the Growl client so remove the comment and initiate a Growl with the following command:

# py_torrentgrowl.py 'Hello Growl'

* If you received the message then everything is working correctly and you can comment the lines back.

* That's it.

 

https://gist.github.com/dhead666/6384442

Share this post


Link to post

How do you set the folder in which transmission downloads to in sickbeard? I can do it in couchpotato as it has a hidden option...but I don't see anything in sb.

 

Cheers

Share this post


Link to post

Use mr-orange's TPB fork.

 

Before you install SB by Influencer you can change the git repository of SB on the advance options of Influencer's plugin.

This only appears once so you'll have to remove the plugin and all the the config files of the plugin and to reinstall it.

 

On SB settings you need to choose Transmission method and not Black Hole.

 

Edit:

p.s. I believe that the days of SB are counted

https://github.com/RuudBurger/CouchPotatoServer/issues?milestone=12&state=open

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this