Fully automated media centre using Flexget, emby, Trakt and IMDb

Further to my post back in 2014 about creating your own automated media centre, I’ve improved on a few aspects of this.

Improvements made:

  1. Replaced Serviio with Emby. Emby is better than Serviio by a long way, and continuously improved.
  2. Enhanced my Flexget setup considerably with 4 private trackers and variables.
  3. Replaced e-mail notifications with Pushbullet push notifications to my iPhone.
  4. Added an NVIDIA Shield (not pro version, don’t need the HDD) with Kodi (and emby for Kodi plugin) to play media locally on my TV.
  5. Added Filebot to do automatic extraction and renaming of files into the relevant place for emby to consume.

Let’s look at the changes one by one.

Emby

Not too much to say here, other than Emby is awesome. You can add multiple accounts for friends, and content and watch history is synced across devices. I have multiple devices accessing it including Android TV/Kodi, Roku, Samsung Smart TV, iPhone App, and Google Chrome. I’m not going to detail how to set it up as that is well documented, but suffice to say emby is a great product and I’m a lifetime premium subscriber.

In my setup, media is automatically extracted by Filebot (below) after being downloaded, indexed by emby using real-time file system monitoring, and relevant meta data is downloaded automatically.

Notable plugins that I have installed are

  1. Emby.Kodi Sync Queue – very important, and provides instant updates to Kodi when new media is available and syncs library deltas to Kodi instead of the entire library.
  2. CoverArt – make things look pretty.
  3. Rotten Tomatoes Reviews – self-explanatory.
  4. Trakt – syncs my libary and watch history with Trakt (cos I’m nerdy).

Flexget

Flexget is an amazingly powerful tool, and is the brains of the setup. Since my original post, I’ve cleaned up my config and updated it for more recent versions of Flexget, and refined my configuration to abstract some of the configuration using YAML alises. My current configuration is below:

What this file is doing is:

  1. Setting up a bunch of templates to be used elsewhere in the config.
  2. Defining what TV series I am going to download based on a private Trakt list (Download list). This allows me to add a show to that list on Trakt and for Flexget to automatically start downloading it. You do not want to use the default Trakt watchlist, as it removes shows when watched for some stupid reason.
  3. Defining some settings for downloading movies (I want 1080p, better than Web-DL, no TrueHD and DTS audio or better) and TV (I want 1080p HDTV or better, but I’ll wait 18hr and then take the 720p version).
  4. Then I define my tasks. I’m monitoring the RSS feeds of 4 private trackers on a 10 minute interval (see schedules) for TV shows, and applying the global and tv-settings templates. I’m also using 4 Flexget search plugins to search those private trackers for missing TV episodes until they are found.
  5. For movies, I am using Flexget’s built-in movie queue to manage movies, and I am updating that movie queue from IMDb every 12 hours (I add a movie to watchlist on the mobile app, and it is added to movie queue and downloaded when available). I am then searching 4 private torrent trackers every hour for these movies using the Flexget Discover plugin.
  6. Finally, I’m seeding for 15 days (cos I’m nice) and then removing the torrent from Transmission completely to free up space (torrent has already been extracted to media library immediately upon download by Filebot).

My variables file looks like this (if you want a full setup).

Pushbullet & Filebot

You can just download the Pushbullet app from the App Store and set up Filebot to send push notifications (see below). I’ve chosen to send push notifications with Filebot (when extraction is complete), but you can also send push notifications of different types from Emby when new media is detected using plugins. I did this so I can see details about the actual torrent Fielbot processed, rather than the media indexed by Emby.

Once a torrent is complete, I have configured Transmission to call the following script by editing /etc/transmission-daemon/settings.json and adding the following line:

Next is the torrent-postprocess.sh script, where the magic happens. This calls Filebot to deal with the download (extract, copy, rename, create directories, etc).

After setting a bunch of environment variables, we call Filebot using the automated media centre (amc) script. This script places all downloaded media into the relevant location in my filesystem (either my Emby TV library or Movie library). For details on these options, you can refer to the Filebot AMC reference guide, but the short version is that it creates a nice folder structure and renames all files in a consistent manner based on title, year, source, video quality, audio quality. After a few seconds, they appear in Emby ready for watching. Don’t forget to have the correct permissions set – Filebot runs as the debian-transmission user in this setup, so you’ll have to adjust accordingly.

And there you have it, the lazy man’s approach to downloading media 🙂

Frank Whitestone

I'm a tech junkie and SaaS product manager living in Toronto, Canada. This is my personal website, and I occasionally write on this blog. Read more on the About page.

One thought to “Fully automated media centre using Flexget, emby, Trakt and IMDb”

  1. Great setup! I’ll try to install in my home PC, and test how it works. Too many variables and scripts, but I hope success!

    Thanks for the post!

Leave a Reply

Your email address will not be published. Required fields are marked *