Update Apr 24, 2019: Added latest config.
Update Jun 20, 2019: Current flexget config can be found on Github.

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. I have a lifetime subscription.
  2. Enhanced my Flexget setup considerably with new private trackers, variables and IRC.
  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 Emby Android App Kodi.
  5. Added Filebot to do automatic extraction and renaming of files into the relevant place for emby to consume. I used the Paid version of this software, well worth it.
  6. Added in 2019: Systemd unit replaces Upstart for auto start in current Ubuntu (18.04).

Let’s look at the changes one by one.


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. I now use the Emby Android App as it provides a better experience imho.
  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 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:

variables: variables.yml

    _transmission: &transmission
      host: localhost
      port: 9091
      username: '{? transmission.username ?}'
      password: '{? transmission.password ?}'

    _iptorrents_credentials: &iptorrents_credentials
      rss_key: '{? ipt.passkey ?}'
      uid: '{? ipt.uid ?}'
      password: '{? ipt.password ?}'

    _torrentday_credentials: &torrentday_credentials
      uid: "'{? td.uid ?}'"
      cfduid: '{? td.cfduid ?}'
      passkey: '{? td.passkey ?}'
      rss_key: '{? td.rss_key ?}'

    _torrentleech_credentials: &torrentleech_credentials
      rss_key: '{? tl.rss_key ?}'
      username: '{? tl.username ?}'
      password: '{? tl.password ?}'

    _alpharatio_credentials: &alpharatio_credentials
      username: '{? ar.username ?}'
      password: '{? ar.password ?}'

    _alpharatio_irc: &alpharatio_irc
      nickname: '{? ar.nickname ?}'
      authkey: '{? ar.authkey ?}'
      torrent_pass: '{? ar.torrent_pass ?}'
      invite_message: '{? ar.invite_message ?}'

    _iptorrents_irc: &iptorrents_irc
      passkey: '{? ipt.passkey ?}'
      nickname: '{? ipt.nickname ?}'

    _tv_lookup: &tv_lookup
      thetvdb_lookup: yes
      trakt_lookup: yes

    _movie_lookup: &movie_lookup
      imdb_lookup: yes
      tmdb_lookup: yes

  trakt_tv_list: &trakt_tv_list
      username: '{? trakt.username ?}'
      account: '{? trakt.account ?}'
      list: Download List
      type: shows

  thetvdb_list: &thetvdb_list
      username: '{? thetvdb.username ?}'
      account_id: '{? thetvdb.account_id ?}'
      api_key: '{? thetvdb.api_key ?}'

      <<: *transmission
      path: /storage
      space: 20000
    pathscrub: windows
    include: reject.yml

    <<: *tv_lookup
      max: 10000
      min: 200
        <<: *trakt_tv_list
        #<<: *thetvdb_list
        exact: no
        target: 1080p hdtv+
        quality: 720p-1080p webrip+
        timeframe: 18 hours
        propers: 48 hours
        identified_by: ep

    <<: *movie_lookup
    proper_movies: no
      min: 1000
      max: 20000
      strict: no
    quality: 1080p webdl+ !truehd dts+
        - movie_list: Movies


    priority: 1
      - rss: '{? tl.rss ?}'
      - rss: '{? td.rss ?}'
      - global
      - tv-settings

    priority: 2
      - global
      - tv-settings
        - next_series_episodes: yes
        - alpharatio:
            <<: *alpharatio_credentials
            category: tvhd
        - torrentday:
            <<: *torrentday_credentials
            category: tvHDx264
        - iptorrents:
            <<: *iptorrents_credentials
            category: [22, 5, 99]
        - torrentleech:
            <<: *torrentleech_credentials
            category: [32]
      interval: 3 hours
    cfscraper: yes

    priority: 3
      - global
      - movie-settings
        optimistic: 30 days
        - movie_list: Movies
        - alpharatio:
            <<: *alpharatio_credentials
            category: moviehd
        - torrentday:
            <<: *torrentday_credentials
            category: movHD
        - torrentleech:
            <<: *torrentleech_credentials
            category: [14, 37]
        - iptorrents:
            <<: *iptorrents_credentials
            category: [48, 20, 100]
      interval: 3 hours
    cfscraper: yes

    priority: 30
    <<: *movie_lookup
      login: '{? imdb.login ?}'
      password: '{? imdb.password ?}'
      list: watchlist
    accept_all: yes
      - movie_list: Movies
    template: no_global
    no_entries_ok: yes

    priority: 100
    template: trakt_tv_list
    <<: *tv_lookup
    disable: seen
      - trakt_series_status in ['ended', 'cancelled']: accept
      - <<: *trakt_tv_list

    priority: 50
      <<: *transmission
    disable: [seen, seen_info_hash]
      - transmission_progress == 100: accept
      - "transmission_ratio < 1.0 and transmission_date_done > now - timedelta(days=15)": reject
      <<: *transmission
      action: purge

    manual: yes
      - global
      - tv-settings

    manual: yes
      - global
      - movie-settings

  - tasks: 'monitor-rss'
      minutes: 30
  - tasks: 'search-*'
      hours: 6
  - tasks: ['update-movie-queue', 'cleanup-*']
      hours: 12

  run_v2: yes

    <<: *alpharatio_irc
    tracker_file: 'AlphaRatio.tracker'
    port: 7000
    use_ssl: yes
    invite_nickname: Voyager
    channels: ["#Announce"]
      - task: irc-tv-dl
          - regexp: TvHD
            field: irc_category
      - task: irc-movie-dl
          - regexp: MovieHD
            field: irc_category

    <<: *iptorrents_irc
    tracker_file: 'IPTorrents.tracker'
    port: 6697
    use_ssl: yes
    channels: ["#ipt.announce2"]
      - task: irc-tv-dl
          - regexp: (TV\/x265|TV\/x264|TV\/Web-DL)
            field: irc_category
      - task: irc-movie-dl
          - regexp: (Movie\/HD\/Bluray|Movie\/Web-DL|Movie\/x265)
            field: irc_category

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 2 private trackers on a 30 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 6hr 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).
  7. In this latest version of the config, I have replaced two private tracker RSS monitors with real-time IRC monitoring for new releases, meaning new releases that match my criteria are downloaded in real-time from the tracker.

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

  username: xxx
  password: xxx

  login: email
  password: password

  account: xxx
  username: xxx

  rss: xxx
  rss_key: xxx
  username: xxx
  password: xxx

  rss: xxx
  uid: xxx
  cfduid: xxx
  passkey: xxx
  rss_key: xxx

  rss: xxx
  rss_key: xxx
  uid: xxx
  password: xxx

  rss: xxx
  username: xxx
  password: xxx

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:

"script-torrent-done-filename": "/home/frank/torrent-postprocess.sh"

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).


export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export JAVA_OPTS="-DuseGVFS=false"
export FILEBOT_OPTS="-Dnet.filebot.Archive.extractor=SevenZipExecutable"

filebot -script fn:amc --log-file "/home/frank/.filebot/amc.log" --def clean=y --output "/tmp" --action copy --conflict override -non-strict --def artwork=n "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" --def "seriesFormat=/storage/TV/{n}/{'S'+s.pad(2)}/{n.replaceAll(/[!?.]+$/).space('.')}.{'s'+s.pad(2)}e{e.pad(2)}.{vf}.{source}.{vc}.{ac}" "movieFormat=/storage/Movies/{n.upperInitial().replaceAll(/[!?.]+$/).space('.')}.{y}.{vf}.{source}.{vc}.{ac}" --def pushbullet=mykey --def reportError=y > /home/frank/.filebot/output.txt 2>&1

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.

Systemd Unit

Update Feb 24, 2019:This is used to auto start Flexget and replaces Upstart config on newer versions of Ubuntu.


Description=Flexget Daemon


ExecStart=/home/frank/flexget/bin/flexget --loglevel info daemon start
ExecStop=/home/frank/flexget/bin/flexget daemon stop
ExecReload=/home/frank/flexget/bin/flexget daemon reload


And there you have it, the lazy man’s approach to downloading media ๐Ÿ™‚

Recommended Posts


  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!

  2. Hey Frank!

    Excellent work. I want to report that the URL that links your original guide/post from 2014 no longer works.
    Could you re-post that or point to somewhere that does?

    Also, with it being 2+ years later, do you expect any of your code to possibly be outdated? ie version history etc..

    Thanks again!

    • Hi Jay,

      Check the link now, think WordPress somehow messed it up.

      With respect to the config, I am still running pretty much the exact same setup. The only thing that has changed is the Flexget config, as Flexget gets updated and the syntax changes. I’ve updated this post with the latest config for you. Lmk if you have any questions.


  3. Hey Franky, great config. I use TorrentLeech. Do you still not use them? Whats wrong with the IRC?


    • Hey Paul,

      The TorrentLeech plugin is broken, I get my Flexget log flooded with errors.

      2020-10-01 09:19:08. ERROR. irc Failed to parse message. Skipping: 

      Does it work for you?

    • I actually had an out of date tracker file, have now updated it from the autodl repo and all seems to be working again.

      • Awesome Franky! love the simplicity of your script. I am currently modifying it for my use. I run transmission on a seedbox, then securely transfer it locally after it’s done.

        Keep up the good work!

        • I am very happy to hear it was useful to you Paul.

          This post is somewhat out of date though, I have since started using docker containers for all these different components to keep it clean and modular. If you are interested, see this GitHub repo. You can also see the latest Flexget config on GitHub, which is more up-to-date than this article.

          Here is the Python script I use to extract the files,which is executed by the Transmission docker container. Might be useful if you are going this route:

          #!/usr/bin/env python3

          import urllib.parse
          import urllib.request
          import os


          # TR_TORRENT_DIR="/downloads"
          # TR_TORRENT_NAME="I.May.Destroy.You.S01E10.PROPER.1080p.HEVC.x265-MeGusta"

          OUTPUT = urllib.parse.quote_plus("/tmp")
          INPUT = urllib.parse.quote_plus(TR_TORRENT_DIR + "/" + TR_TORRENT_NAME)
          LANG = "en"
          SERIESFORMAT = urllib.parse.quote_plus("/storage/TV/{n}/{'S'+s.pad(2)}/{n.replaceAll(/[!?.]+$/).space('.')}.{'s'+s.pad(2)}e{e.pad(2)}.{vf}.{vs}.{vc}.{ac}")
          MOVIEFORMAT = urllib.parse.quote_plus("/storage/Movies/{n.upperInitial().replaceAll(/[!?.]+$/).space('.')}.{y}.{vf}.{vs}.{vc}.{ac}")
          PUSHBULLET = "xxxxx"
          EXEC = urllib.parse.quote_plus("chown -R 1000:1000 \"{folder}\"")

          CMD = "fn=amc&channel=fn&action=copy&clean=on&exec=" + EXEC + "&input=" + INPUT + "&output=" + OUTPUT + "&lang=" + LANG + "&conflict=override&movieFormat=" + MOVIEFORMAT + "&seriesFormat=" + SERIESFORMAT + "&pushbullet=" + PUSHBULLET + "&log=all"

          URL = "http://filebot-node:5452/execute?" + CMD
          r = urllib.request.urlopen(URL).read()

          print ("Filebot called to process " + TR_TORRENT_NAME)

          • Cheers,

            Already found your flexget git repo which I have cloned ๐Ÿ™‚ I thought about migrating to docker, I just don’t have the bandwidth at the moment. Still running on flexget 2.x at the minute. It’s been great but I need to go to flexget 3.x before I move to Ubuntu 20.

            Thanks again!

          • Did you make any changes to the torrent leech tracker? are you just passing rss key and nickname (username?)


          • No changes, and yes just passing nickname and passkey. It does still throw some parse errors in the log though, but seems to work fine.

  4. Hello Frank,

    I am using your flexget config as my basis of my set up, I have a question about your irc_* tasks, you have set them up to be “manual” so how does it work automatically as per comment #7 in your first post.

    Is there any reason why you moved away from monitoring rss feeds vs irc announce channels?

    • Hi Gundu!

      The tasks are set to manual because the IRC plugin calls them directly when it matches something, rather than them being run by the daemon automatically. In the announce channels, there is a continuous stream of releases, and when the irc plugin detects a release that matches, it calls the relevant task to download the torrent.

      I switched away from RSS towards IRC because it is easier to maintain ratio on a private site if you get the torrent earlier, i.e. as soon as it is uploaded.

  5. Hello Frank

    Thanks for taking the time to respond to my comment. I am still not able to wrap my head around the concept of how the irc client is invoked on flexget startup.

    Does flexget just startup the irc plugin if it just sees irc settings in the config.yml? I was getting confused with the manual step as I thought that is an ad-hoc task that a human being runs in the command line.

    I am going to give this a shot shortly, just want to understand the flow esp in comparison to autodl-ircii which I can never get to work properly.


    • Hi Gundu,

      Yes when FlexGet starts up, it sees the IRC config section and connects to the servers and channels defined, using the relevant tracker files for additional config.

      There is a section at the bottom of the config starting at line 329.

      This is the config that actually connects and monitors the channel. Then when the IRC plugin matches something with the regex defined, it calls the manual task to do something (download in this case).

  6. Hello Frank,

    I got the irc section sorted out now, but now stumbling on a few other tasks/sections. So here we go.

    1. Should I use your github flexget-config links as the latest & most authoritative source of config you have in use? Specifically the links shown below


    2. If the github links are the right ones to use, can you please refer to line # 141-151, specifically the list_match section, you refer to a list called “Movies”, from your earlier write up(circa 2019), you say you update your imdb list on your phone with a new or old movie to watch(assuming you have moved to trakt right now), which task pulls the info from trakt and/or imdb and further searches? Is it the scheduled task “trakt-update-movie-queue” ? The scheduled task “search-movie” looks at the list “Movies” but I don’t see where you populate that list with entries to watch?

    3. Further, what if you want to watch a movie that came out in the 60’s and the odds are it will not show up in the rss feed or the irc announce channel? Do you just just manually get those? Or is there another task that will do a “search” in the tracker site and pull down the actual torrent file?

    4. When I attempt to “flexget check” I get some warnings in the template/anchor section about missing “:”, it looks like I can safely ignore that.

    • Hi Gundu,

      1. Yes Github is the latest config for the latest FlexGet.
      2. Yes moved everything to Trakt. Line 141-151 is a config template, that is used in tasks ‘search-movies’ and ‘irc-movie-dl’. The list referred to here is an internal FlexGet list. The task ‘trakt-update-movie-queue’ updates the internal FlexGet ‘Movies’ list with the content from Trakt.
      3. You can manually download (prob best), or the task ‘search-movies’ will do a search of the tracker sites. You’ll have a lot more control this way as to which release you get. The search-movies task is more a backup task if for some reason IRC is offline.
      4. Yes this can be ignored, it is a false warning.

      • So to clarify 2.

        – Add movie to Trakt list
        – trakt-update-movie-queue pulls list from Trakt, updates FlexGet internal movie list called Movies
        – IRC and search-movies task search for Movies on the FlexGet Movies list.
        – Trakt list is cleaned up when the Movie is downloaded, and FlexGet updates it own Movies list.

Add a Comment

Your email address will not be published.