From TV show torrent to iTunes: an automated workflow | Winfred van Kuijk

From TV show torrent to iTunes: an automated workflow

By • Published: January 9, 2010 • Last updated: January 6, 2014 • Filed in: Tips & tricks

Share

flickr: view from 5'2"

The other day I was reading about the number of TV show downloads on BitTorrent and that for some shows (like Heroes and Dexter), the downloads now exceed the average viewership on US television. This must mean there is a need…

If I were one of the millions to download US TV shows like The Office, House,  (because locally they are not available or months/years later), this is how I would do it on my Mac. Use iTunes/Hulu for that you say? Mmm, not available in most countries outside the US.

I would be looking for a way to: monitor new torrents, get them to my computer, convert them to H.264, add metadata and add them to iTunes. And, do this in an automated way and preferably a decentralized way, so I could remain flexible.

This workflow takes advantage of Dropbox, there is a separate page dedicated to smart ways of using the free Dropbox cloud storage.


Azureus/Vuze looks like a nice option, and it can do much of the above, but I find that application to be bloated and a resource hog (a nice alternative: Miro). An alternative I can recommend is TED). I will describe my favorite workflow. Of course this is not the one and only way to do it. Feel free to make variations and/or pick something completely different.

Naturally use all of this wisely, only if and where it does not create legal issues.
I will describe the components, it is up to you to decide if/how/when/where to use them.

Updated October 2010: taking advantage of new version of Automatic and TVShows, which makes the workflow simpler.

I have created a script that uses subliminal and mp4box to search/download/add subtitles.

Summary

The tools I would use:

  • on-my.tv onmytv.info: just so you know when to get the popcorn, a calendar that lists the shows you plan to watch
  • TVShows: a free system preference to monitor RSS feeds and download the .torrent files. As an alternative Automatic, but as of version 2 it is no longer free.
  • Transmission: a light-weight torrent tool, with many useful features and a web interface
  • iFlicks: my favorite metadata tagger and transcoder for TV shows and movies (I use it for the shows I record on my Humax DVR, so I can watch them while on the road)
  • Dropbox: 2 GB of free cloud storage that looks like a regular local folder. Useful for oh so many things, in this case: great for watchfolders (optional)
  • Growl and Prowl: to get nice notifications on your computer or iPhone (optional)

This looks like a long list, but has two advantages: it is a fire-and-forget setup and you can use the individual components for other purposes as well.

Calendar of TV shows

Want to know when your favorite shows will be on TV? The on-my.tv onmytv.info website helps. You can create a profile and only show the programmes that you would want to see. Nothing more, nothing less.

Also nice: it generates an .ics calendar file that you can use in iCal / Google Calendar / etc.


Automatic download of the torrent file

With TVShows (recommended and free) or Automatic (shareware) you can select TV shows and automatically download the torrent file. You simply install it as a system preference, specify the TV shows and/or RSS feed(s), the interval, were you want to download the torrent files, and if the torrent client should open the downloaded file afterwards.

The app can open the torrent file in your default torrent client, or you can let Transmission (my favorite torrent client) monitor a watch folder for new torrent files (e.g. Downloads folder or your Dropbox).

Note: Automatic is now a paid app, where you can directly subscribe to your TV shows. You can also still download the old free version 1.1.4, which only downloads predefined RSS feeds. This works fine in combination with ShowRSS, where you can create your own RSS feed of subscribed TV shows.

Download the TV show

Once you have the .torrent file, you have a couple of options. Manually open the .torrent file, tell Automatic to open the torrent client after downloading it, or -they way I would do it- let the torrent application monitor a specific folder.

Transmission is a nice torrent client, with many useful features. One of which: you can use a watch folder for new .torrent files. The image shows how you could set it up.

The watch folder can be any folder (e.g. Downloads), using your Dropbox folder has the added advantage that you can do this from any place where you can access your Dropbox folder, so: your other computer(s) or even the web or iPhone…

Adding the TV show to iTunes

Chances are that the show you downloaded is in .avi format. No problem for QuickTime player, especially if you have Perian installed (“the swiss-army knife for QuickTime”).

It would be nice though to convert it so it is viewable on your iPod/iPhone/AppleTV/… In that case: say hi to iFlicks (or one of the several applications that do something similar). It converts to iPod/iPhone/AppleTV format and/or gets TV / movie metadata from themoviedb.org and thetvdb.com, so you get description, cover-art and even names of producers and actors (nice if you use Front Row or have an Apple TV).

You set the preferences (format: e.g. Universal, destination, add to iTunes), you can use the application in a manual way or -which I will describe next- in an automated way. Double check these settings, you will not see the iFlicks window when you run iFlicks in an automated way.

Starting iFlicks automatically

In Transmission you can specify where to store the downloaded file. Or in a more fancy way: you can even automatically assign a group depending on the download (e.g. “contains .avi” for group “TV Show”), and then use a group specific destination.

The final step to automate the workflow is to use Apple’s Folder Action. Sounds daunting, actually… quite easy.

Use Finder to go to the parent of the destination folder you defined in Transmission. Right-click the mouse on that folder and select Folder Actions Setup. A dialog appears where you already should see “Automatically Import Video with iFlicks.scpt”, select that one. On the next window you will see the folders that have an action attached, on the right you see the attached script. Just close that window and you are done.

Get notified

As this is all happening automatically, how to be notified when everything is ready? Transmission and iFlicks have Growl support built in. This is already quite nice, but what if you are having fun away from the computer (I know, unlikely scenario… 😉 )?

If you have an iPhone, you might want to consider Prowl, this is an app + service that sends push notifications to your iPhone. You set it up as a display style in Growl, which will show it as a regular alert on your screen and send it as a push notification to your phone. It works with any application on your Mac that has Growl support and has many options so that you only get the alerts you want.

Distributed setup

As an exercise left for the reader, you could even go one step further. You could have receive / convert done by let’s say your home server and then move the result to your media computer. This can be achieved by creating your own Folder Action, using Apple’s Automator. Create a folder on the server like “move to media computer”, let Transmission and/or iFlicks write to that folder and let Automator move files in that location to a new location.

In conclusion

So there you have it. This is how I would do it. Automatic, iFlicks and Prowl cost a few bucks, the rest is free. And, each of them does a specific task and does it well. I prefer that over one things that does many things so-so.

Of course everything changes all the time, so it is quite likely that one of the above components is no longer an option by the time you read this. If it does not work anymore let me know. If there’s something else that you prefer, then share it in the comments.

What workflow would you recommend?

21 Responses to “From TV show torrent to iTunes: an automated workflow”

  1. Narl Joms says:

    Hi there, I just seen that occasionally this website renders an 404 server error message. I figured you would like to know. Thanks

  2. […] From TV show torrent to iTunes: an automated workflow | Winfred van Kuijk […]

  3. anonymous says:

    The folder action called “Automatically Import Video with iFlicks.scpt” no longer works with OSX Mountain Lion.

    Does anyone know a work-around?

  4. Dan says:

    On-My.tv no longer exists

  5. David says:

    Hi!
    I may have missed something but i don’t get the Automatically Import Video with iFlicks.scpt option when i open the folder action. What to do?

  6. Pintatico says:

    I’ve followed the above instructions exactly, and set the script to the relevant folder as a folder action.
    But – when I have a new .avi file in the folder nothing happens. iFlicks doesn’t start up and convert the movie.

    Have I missed something?

  7. Bruce says:

    Great stuff guys. Is there a way using the automator folder actions script to set the encoding level to best match the original file? i.e. if download a small say 640-480 22k audio avi is their a way of setting the video frame rate, resolution and audio quality to match the original as closely as possible so i’m not wasting disk space?

    I also wanted to play around with building a iflicks transcoding cluster of sorts with my 4 mac’s that I have and the 4000+ videos I want to convert. If I had one central folder with TO BE DONE videos and I have each seperate system watching the same folder is there a way to get only one system to “Claim” the video and work on it?

    Would love to get other peoples thoughts on that kinda setup.

    Thanks in advance

  8. Daniel says:

    This is great, but I have one problem. iFlicks is adding the files correctly using the folder actions but the conversion process isnt starting automatically. I still have to hit the start button…

    Any suggestions to fix this?

    • winfred says:

      The way I have set it up:
      – folder action for the folder where the new file arrives
      – the applescript for that folder (don’t remember if that was a standard one or custom made):


      on adding folder items to thisFolder after receiving addedItems

      repeat with movieFile in addedItems
      tell application “iFlicks”
      import movieFile without gui
      end tell
      end repeat

      end adding folder items to

      • Simon says:

        Woow, great job ! But how does this last step work exactly ? (starting the conversion process automatically ?)

        Thanks !

  9. Ollie says:

    Fantastic!
    Got this working and I’m really grateful for the post. Just wondering though, I have a slight issue with some shows appearing with an ‘&’/’and’ in the middle and so iFlicks doesn’t pull down the right info from tvdb. Is there a workaround or rule that I can apply to change this? (Also helpful if I could put Conan (2010) as it keeps tagging another series with the same name).

    Many thanks to anyone who might consider helping me 🙂

  10. Scott says:

    Awesome! Thanks so much for sharing. I use some of these in my process but you’ve given LOTS of tips that were missing from mine and I’m eager to try them out! Thanks!

  11. dan says:

    Thanks for the update. I use your system, with slight variation. One issue I hit is torrents that come down as a folder as not automatically converted. And iFlicks wont delete the original video file for me.

  12. Steve says:

    Hey Winfred,

    great workflow. In fact, I have one that is almost exactly the same as yours…the only difference is I use this little open-source app called “transcoding machine” to convert my tv shows, and have iFlicks act solely as a tagging mechanism thereafter. Of course, your way works too. TranscodingMachine uses the Handbrake CLI to do its magic and does its own tagging too, although I prefer the way iFlicks handles the files.

    To use TranscodingMachine, complete and incomplete downloads must be separated as directories in Transmission. I have folder actions set to monitor the “complete” downloads folder so iFlicks can do its thing.

    http://code.google.com/p/transcoding-machine/

    Cheers!

  13. Jared says:

    Awesome! Question though, can you eliminate steps 2 and 3 by downloading TVShows and using it instead? Are there any issues with that? Thanks again Winfred!

  14. Tim S. says:

    Thanks for the great workaround for iFlicks automation. Just what I was looking for!

Leave a Reply

« | Home | »