Automatically Sorting Downloaded Television Episodes From Transmission

1 minute read

If you were to download torrents of television shows frequently, you would probably find that manually sorting the episodes into your media center directories was tiresome. For this hypothetical situation, I thought of an automated solution to the problem so manual sorting wouldn't be required.

It works by having Transmission run the script after an episode has been downloaded. It then scans the location where downloaded episodes go, attempts to match it to the show on your system, finds the right season to put it in, moves the file into that season folder, then removes the torrent from Transmission.

The script is fairly conservative in that it won't move anything, delete anything or create anything if it isn't pretty sure about the match.

Check out the script below.


  • You are using Transmission to download torrents
  • You have a directory structure that looks like
    /path/to/Television/[SHOW NAME]/[SEASON X]/[VIDEO FILE]

Setup Instructions

  1. In Transmission, enable the remote. Turn off the password, but only allow IP's from your local router (192.168.1.* for example)
  2. Download the file below, edit to fit your setup, then save somewhere
  3. Make the file executable by doing a chmod +x [FILE]
  4. In Transmission, add a script to run after download in the app preferences. Point it to where you saved the script.

Automatic Transfer Script

The script is located on github as a gist, so if you see room for improvement, please submit your changes.

Was this page helpful for you? Buy me a slice of ๐Ÿ• to say thanks!