Flexget

This article will show you how to install Flexget and discusses basic configuration. Flexget can be used to fetch torrents from RSS feeds. It is an alternative to ruTorrent's RSS plugin which does not use the filesystem as a database (and thus does not suffer from ruTorrent's problems).

You'll need to execute some commands via SSH to use this software. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).

Installation

To install Flexget, please first install pip to a virtual environment first.

Once you've done that, copy and paste the following:

~/pip/bin/pip install flexget
touch ~/config.yml

Installation notes

The final command executed above will create an empty file called config.yml on your slot (at home level). This is done because creating via virtualenv does not automatically create a config.yml file. The command will not overwrite the contents of config.yml if it already exists.

Configuring Flexget

The creation of custom configs to grab your feeds is not something staff can help with. The Flexget website has lots of resources and beginner guides to get you started.

The only configuration covered in this guide is passing to the various torrent clients supported at Feral. This is only needed if you wish to pass additional options to the client. Otherwise, it should be fine to simply specify the watch directory and let the client manage the torrent.

rTorrent

Here is an example of a dummy guide using variables instead of actual values:

tasks:
  task1:
    rss: feed_URL
    series:
      - series_name
    rtorrent:
      uri: ~/private/rtorrent/.socket

Deluge

Here is an example of a dummy guide using variables instead of actual values:

tasks:
  task1:
    rss: feed_URL
    series:
      - series_name
    deluge:
      port: deluge_port

Replace deluge_port in the above command with the result of the following command:

grep daemon_port ~/.config/deluge/core.conf

Transmission

To use directly with transmission you first need to install and configure transmissionrpc. This is done by executing these commands:

pip install --user transmissionrpc
sed -i "s|base_url + '/t|base_url + '/$(whoami)/t|g" ~/.local/lib/python2.7/site-packages/transmissionrpc/client.py

Here is an example of a dummy guide using variables instead of actual values:

tasks:
  task1:
    rss: feed_URL
    series:
      - series_name
    transmission:
      host: server.feralhosting.com
      port: 80
      username: username
      password: password

In addition to replacing feed_URL and series_name in the above, you also need to replace the following

server
Your server name (e.g. Brontes)
username
Your username
password
Your transmission access password

Running Flexget

You can run Flexget by copying and pasting:

~/pip/bin/flexget execute

Note that this will download data if properly configured and a match is found. If you don't want this to happen simply specify the --test option:

~/pip/bin/flexget --test execute

Using Cron to execute the config

You can use the job scheduler Cron to instruct Flexget to run at regular intervals. To bring up the crontab editor use the command crontab -e.

If this is your very first time you'll be given a choice of editors. Nano is fine to use so unless you specifically want something else just press Enter.

There will already be some basic information on crontabs in the file - you can keep it if you like, or get rid of it if you prefer. The lines are commented out so are for information purposes only and don't affect any cron jobs added.

At a new line in the file copy-paste the following:

*/10 * * * * ~/pip/bin/flexget --cron execute

The example cron job above will run Flexget every 10 minutes. You can reduce that if you like but it's in your interest to respect the tracker rules on this. If you don't know what they prefer it's best to ask (Feral will not assist circumventing a tracker ban).

Troubleshooting

On executing Flexget I get a permission denied error on /tmp/safe-0.4.words.cache

Somebody else is using Flexget and writing there, so your instance will not be able to. You'll need to set the TMPDIR variable. You can export it each time or set it as an alias for ease of use. To set it in .bashrc execute these commands:

mkdir ~/tmp
echo "alias flexget='TMPDIR=$HOME/tmp ~/pip/bin/flexget'" >> ~/.bash_aliases
source ~/.bash_aliases

You can then just use flexget from anywhere on your slot to run it (options such as --test will still work with the alias).

Uninstallation

~/pip/bin/pip uninstall flexget
rm ~/config.yml

You might also wish to remove the line from the crontab if you created it previously.