Thursday, April 7, 2016

Email Notifications for Kodi / OpenELC (Part 2)

 

Getting it


The Difference Engine can be found at;

https://github.com/najmead/thediffer

It's written in Python 3, and has been tested on Mac OSX using Pyzo (which comes with Python 3.4) and on Debian 7.9.  It should probably work on any other Linux system.  And it should probably work on Windows, assuming you have Python 3 installed.  It probably won't work on OSX natively, since it ships with Python 2.7.

Use git to clone the repository.  Alternatively, if you aren't using git and don't want to install it... you can just download the main script (differ.py) and the stylesheet template (stylesheet.css).  You'll also need to download the example config file, and modify it for your own settings (more on that later).

Running the Difference Engine


Run 'python3 thediffer.py' from your command line or whatever your python environment uses.  The first time it runs, thediffer.py will try and create a new sqlite database, and populate it with data from your Kodi / OpenELEC media player.  Depending on the size of your library, this could take a long time.  At the moment, in order to help me with debugging, it spews out quite a lot of information so you'll know it's working busily.

Once the initial database has been created and populated, subsequent runs should be much faster.  Though, if you turn on the option to query the TVDB this can slow things down.


Configuration


There is an example config file in the github repository.  Download it, rename it to thediffer.conf and fill in the appropriate details.  Some basics around the configuration;

  1. Scan days -- this is the number of days the differ will scan back to, looking for updates.  Generally, this depends on how frequently you schedule it to run.  If you run it daily, set the scan days to 1.  If you run it weekly, set the scan days to 7 (and so on).  The update option determines whether you want to issue Kodi with an update command before commencing with the scan (to make sure the media library is up-to-date).
  2. Email -- Set this option to True if you want to receive an email.  If left at False, it will simply dump out an html file (which you can either email using another app, or present using a webserver).  If set to True, make sure to fill in the details of your email provider
  3. TVDB -- if set to True, the differ will call the TVDB API, to find an IMDB identifier and (where available) use that to create live hyperlinks in the html.  You'll need a TVDB account for this to work.  It's a nice option, but completely unecessary.
  4. Styles -- modify this if you want to change the look of the emails.







1 comment:

  1. Thanks for sharing, nice post!

    Tìm hiểu thuốc pediakid cho trẻ http://mayduavong.me/nen-mua-may-dua-vong-tu-dong-loai-nao-tot-nhat-gia-bao-nhieu/ cho trẻ có mấy loại hay tìm hiểu về sản phẩm máy đưa võng cho trẻ http://mayduavong.ws/ hay thuốc bổ cho trẻ mua ở đâu http://muahangtrenebay.com/mua-siro-pediakid-vitamin-d3-cho-tre-o-dau-uy-tin-tot-nhat.html hay tìm hiểu tinh dầu toàn thân cho trẻ với http://mayduavongtudong.org/p/lam-the-nao-de-giup-tre-bieng-an-an-ngon-mieng-va-tang-can.html và tìm hiểu địa chỉ bán thuốc cho trẻ với http://mayduavong.in/siro-pediakid-bo-sung-omega-3-cho-tre-cua-phap-co-tot-khong/ ở đâu uy tín tốt nhất

    ReplyDelete