Musings of a Programmer

Rarely-used blog of Dan Harper.
View all blog posts

Raspberry Pi 2, SickBeard

February 25, 2015

  1. Installing Raspbian
  2. Auto-Mounting USB Drives
  3. Transmission
  4. SickBeard
  5. CouchPotato
  6. MiniDLNA
  7. Samba

Instead of SickBeard, we're going to use SickRage which is a fork designed more for torrents.

Installing SickBeard/SickRage

Install the dependencies:

sudo apt-get install python-cheetah python-lxml

Clone the source into a new directory ~/.sickrage:

git clone ~/.sickrage

Copy the sample basic config file so we can use it:

cd ~/.sickrage/autoProcessTV
cp autoProcessTV.cfg.sample autoProcessTV.cfg

We can manually run SickRage/SickBeard now by invoking the python script, however this'll have to be done manually after every reboot (not good):

python ~/.sickrage/

By default, it'll start running on port 8081. You can access it by visiting http://ip-address-of-pi:8081. Find out your IP either through your router's web interface, or by running ifconfig.

We can run SickBeard as a service, which allows it to be auto-started on boot and managed by the OS. To start, copy the provided init file:

sudo cp ~/.sickrage/init.ubuntu /etc/init.d/sickbeard
sudo chmod +x /etc/init.d/sickbeard

If you look in this file, you'll see references to a config file, so let's create that one (note this file must be named sickbeard as it's what the init script is expecting):

sudo touch /etc/default/sickbeard
sudo chmod +x /etc/default/sickbeard
sudo vim /etc/default/sickbeard

In here we can configure SickBeard to auto-run using the pi user, and to store data in our directory at ~/.sickrage:


The full available config options can be seen in the init file:

## SB_USER=         #$RUN_AS, username to run sickbeard under, the default is sickbeard
## SB_HOME=         #$APP_PATH, the location of, the default is /opt/sickbeard
## SB_DATA=         #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickbeard
## SB_PIDFILE=      #$PID_FILE, the location of, the default is /var/run/sickbeard/
## PYTHON_BIN=      #$DAEMON, the location of the python binary, the default is /usr/bin/python
## SB_OPTS=         #$EXTRA_DAEMON_OPTS, extra cli option for sickbeard, i.e. " --config=/home/sickbeard/config.ini"
## SSD_OPTS=        #$EXTRA_SSD_OPTS, extra start-stop-daemon option like " --group=users"

And finally register the script to run on boot:

sudo update-rc.d sickbeard defaults

If you reboot, SickBeard should be running automatically. You can manually start/stop/restart with sudo service sickbeard [start|stop|restart].

Configuring SickBeard

Firstly, disable SickBeard from launching a browser process, which we'll never need as we're running headless by changing Settings > General > "Launch Browser".

Select your preferred Torrent provider under Settings > Search Providers > Provider Priorities. Many free and premium services are supported, including IPTorrents.

Then once you've enabled some services, you'll need to configure your login details in Settings > Search Providers > Provider Options (you may need to refresh your browser, the app didn't update correctly for me).

In Settings > Search Settings > Torrent Search configure where SickBeard should store the torrent files it downloads. You can either configure a "Black Hole" location pointing to the Watch dir we set up earlier, or SickBeard can send the torrent directly to the Transmission daemon.

If you choose direct Transmission communication, set the "host:port" field to http://localhost:9091 and leave "Downloaded files location" blank to use our pre-configured Transmission setting.

In Settings > Post Processing set "TV Download Dir" to the "Completed" directory we configured Transmission to place finished files in. SickBeard will monitor this directory for completed TV show downloads. You'll also want to set "Process Episode Method" to "Move" to keep space free and check "Scan and Process".

You can optionally change the naming convention SickBeard will use for downloaded episodes under Settings > Post Processing > Episode Naming. Personally I use Season %0S/%SN - %Sx%0E - %EN which will place files in a sub-directory named after the season number, then name the file itself in the format "Show Name - 2x03 - Ep Name.ext".

You can receive Notifications through a variety of means under Settings > Notifications. I'm using Pushbullet, and get notifications to my phone when an episode starts & finishes downloading.

Using SickBeard

Simply go to Shows > Add New and either point at an existing directory for a show you already have and want more of, or search for a new show.

SickBeard will download new episodes as they become available, and you can press the 'Search' button next to an episode you don't have to start a download manually.

[partial source]