Media center (OSMC) with automated TV Shows and subtitles download. Once configured, sit and watch TV.
APACHE-2.0 License
Build status:
Setup of a media center with automated episode downloads in the background.
These are the applications this setup configures and automates for you:
Watch TV as soon shows are released without doing anything.
This setup has been running since 2015 and now in 2018 has been updated to support raspberry 3 using OSMC release 2018.03-2 (if there is a newer version now, should work)
After the installation you get a mediacenter operated from your TV remote. All your selected TV Shows are puctually downloaded in their correct folder with its subtitles, and the filesystem is kept clean and organized, no maintenance to do. Some of the features are:
The following services can be used remotely:
Service | Access | User / Password |
---|---|---|
Transmission web client | http://$OSMC_HOST:9091 | transmission / transmission |
Kodi Web (Remote) | http://$OSMC_HOST/ | None |
Open SSH | ssh osmc@$OSMC_HOST | osmc/osmc (sudo is available) |
Samba is not installed, all my downloads go to an external storage (USB) that I can carry everywhere. Think that the Raspberry is not a regular PC and you can hit memory limits easily, the less services you put the better. Occasional transfers can be easily done using scp myfile osmc@$OSMC_HOST
.
In order to start the installation just SSH to your fresh OSMC installation in the raspeberry:
ssh osmc@YOUR_OSMC_IP
Then the installation starts by copy-pasting these lines:
bash <(curl -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -s 'https://raw.githubusercontent.com/alombarte/raspberry-osmc-automated/master/install.sh') /home/osmc/.raspberry-osmc-automated 2>&1 | tee installation.log
The installation script will download all necessary files and will configure the raspberry for you. At the beginning of the installation process you will be asked for your RSS feed
URL, your IP and the mountpoint of your external storage (if any). Once you have answered the questions, leave the computer and do something else. The process is long, and if there is anything broken you will be able to see it in the installation.log
.
Your mediacenter is ready!
If you don't have a RSS you can sign up in a free service like ShowRSS. Once you have done it add some TV Shows to your feed and then get the link by clicking "Generate" in the feeds section
If you want to tweak on the existing installation, this might help you a little bit. To begin with, all the configuration variables you chose during installation are saved in /home/osmc/.raspberry-osmc-automated/bash/settings.cfg
. Don't change them because it doesn't have any effect, they are used only during the installation and are there for informative purposes afterwards.
The following paths assume you installed the application under /home/osmc/.raspberry-osmc-automated
The Real magic happens by configuring this task. The default task downloads all episodes to /home/osmc/TV Shows
, it uses a structure like TV Shows/Show name/Season 1/Episode Name
For any changes edit the file:
/home/osmc/.raspberry-osmc-automated/flexget/config.yml
Then execute flexget to see if it's working (the flexget daemon might need to be restarted):
/usr/local/bin/flexget exec
All jobs executed by flexget related with TV Shows
try to download the subtitle in the language you chose during installation. There are 2 different attempts 2 download subtitles:
subliminal
tool to get the associate subtitle. This operation might fail if you are downloading a just aired episode and the subtitles have not been written yet.If post-install you ever need to change the subtitle language you need to edit 2 files:
/home/osmc/.raspberry-osmc-automated/flexget/config.yml
and change the 2 letter code (e.g es
) in the following line: exec: subliminal download -l es ....
crontab -e
and look for the line invoking subliminal
If you have an account in addic7ed
you can pass your credentials in the aforementioned places adding the flag --addic7ed YOURUSER YOURPASSWORD
. E.g:
/usr/local/bin/subliminal --addic7ed YOURUSER YOURPASSWORD download -l es -s "/home/osmc/TV Shows/"
If you want to change the frequency of the feed checking, add, or remove jobs just execute:
crontab -e
In the crontab there is a commented job that deletes TV shows that are marked as seen by Kodi after 1 month. If you want to enable this feature just uncomment the line in the crontab and save.
If you want to stop typing the password every time you SSH to the Raspberry Pi do the following in your Mac/Linux:
# Put here your raspberry IP, e.g:
OSMC_HOST=192.168.1.10
# Copy SSH key to OSMC server
cat ~/.ssh/id_rsa.pub | ssh osmc@$OSMC_HOST 'mkdir -p ~/.ssh; umask 077; cat >>~/.ssh/authorized_keys'
If you see this message on every login:
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)`
This is a possible fix:
sudo locale-gen "en_US.UTF-8"
sudo dpkg-reconfigure locales
# Choose en_US.UTF-8
The system keeps track of your series feed and downloads periodically all files found but you might need from time to time to parse and extract from another one (e.g: first day you download a new serie). There is a bash script that adds in your transmission all magnets found:
bash /home/osmc/.raspberry-osmc-automated/bash/download_magnets_in_rss.sh http://showrss.info/show/117.rss
The previous call would add to Transmission all magnets available for the serie.
The spotify plugin doesn't come preinstalled. If you have a Premium account you will be able to install it using bash/spotify.sh
.
The Youtube plugin can be installed manually from the Add-on repository browser.