I was encouraged by this
post to write this opus, as some moments are not covered in sufficient detail in it. Below I will describe on my own example the implementation of the automatic rocking of torrents with Lostfilm using
FlexGet and
Deluge . Everything will go under Ubuntu 9.10
First you need to install torrent client Deluge version 1.2 or higher.
Add the PPA
from here via System-> Administration-> Application Sources-> Other Software (yes, this can be done via the console, but it’s more convenient for me so ....). Then update
sudo apt-get upgrade
and put the client
sudo apt-get install deluge
also put the demon deluged (this is one of the key points)
sudo apt-get install deluged
After installation, launch the client and go to Edit-> Options-> Interface-> Classic View and disable this option. After the client restarts, a new item Change-> Connection Manager will appear. We launch our demon in it on 127.0.0.1. Everything, the client is set to receive.
Next put FlexGet. The installation is described in detail
here in clear language. Whoever has a high skill - set up from svn - there are more new and interesting buns for fine tuning. but the default r1226 is also suitable for starting, later you can always upgrade.
')
Now let's set up FlexGet.
I had 2 tasks:
- automatically download multiple TV shows from my list
- list them in folders for my convenience and for use in XBMC
The default configuration for FlexGet is in ~ / .flexget / config.yml, but you can use any place with the special option -c (which I did). The list of options is available through flexget -h
The config is a file in
YAML format. It is important to remember one moment - any extra space destroys the structure of the config.
my config.yml config looks like this (the points are replaced by the same number of spaces, namely the spaces, not the tabs - THIS IS IMPORTANT. The code tag did not allow me to show the required number of indents, so there are dots)
feeds:
..lostfilm:
....headers:
......cookie: "uid=******; pass=**********************; usess=***********************"
....rss: lostfilm.tv/rssdd.xml
....deluge:
......label: lostfilm
....regexp:
......accept:
........- 'Fringe': /home/crow/media/Fringe/
........- 'Stargate Universe': /home/crow/media/Stargate.Universe/
........- ' ': /home/crow/media/Vampire.Diaries/
important points:
- create a folder for storing serials in advance
- The cookie uid and pass are NOT the login and password from the blank film, as I originally thought ... These data can be viewed in cookies using the FireBug (or any other method convenient to you) by logging in to the lock film
- A new usess parameter has been introduced (to protect against torrent file sharing). Watch in your profile by logging in on the Losterfilm
- Search for series in rss is best for a unique name in Latin, although it is possible and Cyrillic. But it is imperative to find a unique string for each series. for example, the “Stargate” query would start me dragging on Stagate SG-1, Stargate Atlantis and Stargate Universe, if they were all in the feed at the same time.
- it’s better not to use spaces in file folders
now run FlexGet from the terminal with the command
flexget -c /path/to/config/config.yml
The result should look something like this.
2010-04-15 01:44 INFO deluge lostfilm Using deluge 1.2 api
2010-04-15 01:44 INFO feed lostfilm Produced 15 entries.
2010-04-15 01:44 INFO feed lostfilm Accepted: 3 (Rejected: 0 Undecided: 12 Failed: 0)
2010-04-15 01:44 INFO download lostfilm Downloading: (Fringe). . . (Olivia. In the Lab. With the Revolver).. (S02E17)
2010-04-15 01:44 INFO download lostfilm Downloading: : (Stargate Universe). (Divided).. (S01E12)
2010-04-15 01:44 INFO download lostfilm Downloading: (The Vampire Diaries). (Let the Right One In). (S01E17)
2010-04-15 01:44 INFO deluge lostfilm Connecting to daemon at localhost:58846..
2010-04-15 01:44 INFO deluge lostfilm Connected to daemon at localhost:58846..
2010-04-15 01:44 INFO deluge lostfilm (Fringe). . . (Olivia. In the Lab. With the Revolver).. (S02E17) successfully added to deluge.
2010-04-15 01:44 INFO deluge lostfilm : (Stargate Universe). (Divided).. (S01E12) successfully added to deluge.
2010-04-15 01:44 INFO deluge lostfilm (The Vampire Diaries). (Let the Right One In). (S01E17) successfully added to deluge.
2010-04-15 01:44 INFO deluge lostfilm Connection lost to daemon at localhost:58846 reason: Connection was closed cleanly.
Basically, that's all. It remains only to throw the command in cron for execution on a schedule.
There are many options that allow you to more flexibly customize the interaction between FlexGet and Deluge (such as renaming downloaded files and scattering across subfolders such as season01, season02). But this topic pulls into a separate article.