Flexget is a tool that can automate a lot of things for your mediacenter.
I pay for lineair tv, Netflix and cinema but still prefer to use this method because it provides a better experience.
http://Trakt.tv is a legal site, similar to IMDB.
You can mark tvshows you like (add them to a list) and mark movies you would like to watch (add them to Trakt’s “Watchlist”. Also, it keeps track of Kodi’s watched status. So Trakt knows what you would like to watch and what you have already seen.
What will flexget do?
Flexget will run on your OSMC device, scan your Trakt.tv lists, checks if shows have been fully watched and/or ended and clean up your list if needed. Also, it will figure out the next episode you would want to watch.
Flexget will scan your harddrive for matching content. It will scan your manual download folder and process the matching files as described below.
Flexget will create a list of all movies and unwatched episodes.
Flexget will scan RSS feeds and sites for magnet links that match the unwatched list and only select those that match specific quality and language restrictions.
Flexget will add these magnets to Transmission with correct naming scheme that matches TheTVDB and IMDB, this guarantees Kodi will always be able to recognise the content(!).
Flexget will only download the main file and subtitles, no other files that clutter your drive.
After downloading, Flexget will move the files to the correct folders, again checking if naming schemes. Flexget will make sure you have a neat folder structure.
Also, the files will be added to a subtitles queue and Flexget will use Subliminal to keep looking for subtitles that match your language settings.
Also, Flexget will trigger Kodi(!) to scan the new files to the library.
For movies, they will be removed from your Trakt Watchlist after they have been retrieved.
Once you have finished watching episode 1 of a new season (>1), Flexget will delete older seasons within a week.
After deleting old, watched seasons, Flexget will trigger Kodi to cleanup its library.
Flexget will cleanup Transmission regularly.
A more detailed description of these steps.
Basically, after setup (which is pretty easy) all you need to do is add stuff to your Trakt lists and sit on your couch to watch. Nothing else!
Highly recommended because this can be confusing (when to use sudo and when not is very important). Use the Autosetup.sh and make sure you mark flexget=1 and transmission=1. Transmission should already be installed via MyOSMC(!). Follow the instructions on Github.
–> The script requires your trakt username (required), logins to subtitle sites (create them if you need it) and the desired Transmission user/pw (required, will be configured in Transmission for you). Also the path to your temp download folders and permanent folders. The script will configure Flexget and Transmission accordingly.
This is simply a copy paste of the Autosetup.sh script. Note the $variables need to be filled in by you (use the script if you don’t know what to do). "$HomeFolder should be /home/osmc.
sudo apt-get -y install python3
sudo apt-get -y install python3-pip
sudo apt-get -y install
sudo apt-get install -y python3-libtorrent
sudo pip install --upgrade setuptools
sudo pip install virtualenv
virtualenv --system-site-packages -p python3 $HomeFolder/flexget/
bin/pip install flexget
pip install subliminal>=2.0
pip install transmissionrpc
pip install transmissionrpc --upgrade
wget -O config.yml https://rawgit.com/zilexa/flexget_config/master/config.yml
wget -O secrets.yml https://rawgit.com/zilexa/flexget_config/master/secrets.yml
sed -i "s/TraktUser/$TraktUser/g" $HomeFolder/flexget/secrets.yml
sed -i "s/TransmissionUser/$TransmissionUser/g" $HomeFolder/flexget/secrets.yml
sed -i "s/TransmissionPw/$TransmissionPw/g" $HomeFolder/flexget/secrets.yml
sed -i 's|media/RootOfMedia/|'$MediaFolder/'|g' $HomeFolder/flexget/secrets.yml
sudo mkdir $HomeFolder/flexget/plugins/
wget -O log_filter.py https://rawgit.com/zilexa/flexget_config/master/plugins/log_filter.py
If you do the installation manually, make sure you personalise the secrets.yml file!
Also, I recommend creating a systemctl service for Flexget and enable it (but don’t start it yet). Autosetup.sh does this automatically. Have a look at the contents of the script on github for an example.
Run the command
~/flexget/bin/flexget -V. It should give you the version you installed.
Authenticate Flexget with Trakt
Trakt needs to authenticate Flexget to allow access to its (free) API for your Trakt account. To do this, run this command:
~/flexget/bin/flexget trakt auth yourtraktusername
First run (important!)
(do modifications listed below first, if you need any).
Now, Flexget needs to do 1 full run. All the tasks listed above are carefully scheduled (some run every 30 minutes, some once a week). But for the first run, all tasks need to run according to the priorities set for each task. All you need to do is run this command. It could take up to an hour easily:
~/flexget/bin/flexget execute --now
That’s it! You can now start Flexget as a daemon:
sudo systemctl start flexget
Enjoy… I have been for months and it is awesome!
Modify quality settings
Please have a look at this table to understand the quality options and this wiki to understand how it works.
nano ~/flexget/config.yml or use Filezilla to edit the file on your Mac/Windows Notepad.
Line 38: By default, it will try to get non-10bit, 720p/h265 files. This plays fine on a RPi3.
Line 39: If not found, it will accept HDTV quality or higher in mpeg4 (xvid) or h264 or higher format.
Below the series part (line 52), there are 3 buckets: HQ, NQ, LQ. Flexget will always try to find movies that match the HQ template and fallback to NQ or LQ eventually, if nothing found. You can modify the filesize and resolution to roughly get the bitrate you want. By default, these buckets have been carefully configured. It works well and is adjusted to general availability of filesizes and qualities.
Modify language settings
Have a look at the rejections at line 85. Make sure your language is not listed. By default, no translated content is accepted. Only original language content. Also Hindi is excluded. you might want to include that for Bollymovies.
For subtitles, change lines 627 and 654 and 842. You can also add other languages.
As an extra, you can add personal/private RSS feeds and use a personalised http//:showrss.info feed (highly recommended, the generic showrss feed does not contain quality info and will therefore be ignored by Flexget). Add/remove RSS feeds starting at line 377.
Also if you know an RSS search provider (like torrentz2 on line 415), you can add that below line 415. You might need more tricks to make it work (see line 167).
Credits go to the Flexget team, all the support they gave me the last 7 months and to Jonybat for his awesome config, which this config.yml is based on for 90%.