In the previous post, I mentioned that I will write a series of tutorials about using FlexGet to automatically download torrents from RSS feeds. This is the first part of the series which focuses on  the installation and configuration of FlexGet.

At this point you may be wondering what FlexGet actually is? To answer this question, let's start with a brief introduction.

FlexGet is a very flexible automation tool that can be used to automatically grab and manage content like torrents, podcasts, comics, movies, series ...


FlexGet is particularly useful when it is used with applications that support the Watch Directory function (e.g. Transmission).

Here a list of FlexGet key features:

  • Support many sources (RSS, HTML, CSV ...)
  • Sort movies using IMDB ratings
  • Download movies using IMDB or trakt.tv watchlists
  • Very robust TV Shows plugin (Filter downloads by episode number, quality ...)
  • Use RegEx to filter content
As I mentioned above, FlexGet is a very extensible tool that gives you a lot of possibilities. While we can't cover all these possibilities, we will focus on using FlexGet in conjunction with Transmission to automatically download torrents as soon as they are available (Using RSS feeds).

Installation:


To install FlexGet, run the following commands in a terminal:

sudo apt-get install python-pip
sudo pip install flexget

Configuration:


Before you start using FlexGet, you need to create a basic configuration file. FlexGet uses YAML syntax to store the configuration.
To create a configuration file, issue the following commands into a terminal window:

cd ~/.flexget
touch config.yml

Syntax:

The general syntax of the configuration file should look something like this:

tasks:
sometask:
inputplugin:
inputpluginoption1: option1
inputpluginoption2: option2
filterplugin:
- filter1:
# Indent by 4 spaces when defining options for a list item
filteroption: option
outputplugin:
outputpluginoption1: option1
outputpluginoption2: option2

As you can see in the example above, the syntax is pretty straightforward. However, you must respect the following rules:

  1. Tasks are the main components of the config file.
  2. Tasks are called sections and they must end with a colon (tasks:).
  3. Everything that belongs to a section must be indented by  2 SPACES (DON'T USE TABs).
  4. Plugins (Input, Filter, Output) must use the same indentation level.
  5. Options that belong to a list item must be indented by 4 SPACES.

Configuration example:

This example will download the torrent files (new episodes) of Deadside and Pioneer One to ~/Downloads:

tasks:
my task:
rss: https://www.example.com/rss
series:
- Pioneer One:
# You can specify the desired quality using the quality option
quality: 480p
- Deadside:
quality: 720p
download: ~/Downloads

To use this configuration, simply copy the aforementioned code block, then paste it into the configuration file config.yml that you have already created.

To test you configuration, run the following command in a terminal:

flexget --test

Scheduling:

You can easily schedule your downloads by adding FlexGet to your crontab list.

To do so, open up a terminal window, then paste the following lines into it:

export EDITOR=nano
crontab -e

Now here is the funny part, to make FlexGet run in the background every hour, simply add the following line to your crontab file:

@hourly /usr/local/bin/flexget --cron

You should now have a working FlexGet configuration.

NOTE: In order to automatically download new feed entries (i.e. torrent files available through RSS) using Transmission, you need to enable the Watch Directory feature (We have already blogged about this in the previous post).

Comments