Did you ever realize that a movie was shown on TV just yesterday and missed to record it?
+*Description:*+
The "EPG Movie Mailer" was scripted to notify you immediately by mail about movies you always wanted to watch (e.g. IMDB top 250) and that will be soon shown on TV.
+*UPDATE (07.07.2015):*+
A Kodi plugin was developed for the EPG Movie Mailer. It is attached as a ZIP file to this post. There is an own post in the kodi.tv forum (http://forum.kodi.tv/showthread.php?tid=231529).
+*How it works*+:
The script is given a list of movies you'd like to watch. Then it searches the EPG (Electronic Program Guide) for that movies and mails you the results. Now you are informed about upcoming movies and can record it on time.
Technically it uses the API from the TVheadend server to search the EPG. Further analysis is done in python code. This includes the following features:
* Input movie list is given as a plain text file (each line is one movie)
* Movies are identified in EPG by regular expressions case incensitive (inherent feature of TVheadend API)
* On multiple execution it only mails new results and remembers already mailed movies
* For one movie multiple schedules are summarized
The following screenshot of a mail gives an example output (the movie list included only one search item: "Tatort"):
!client-htsp-epg-movie-mailer-release_20150627-v01.py.mail.png!
The layout can be customized as I am not the marketing guy ;)
You still have to filter the mailed results, depending on the movie's name (e.g. "Water" will give quite a lot of results) and the regular expression you define (e.g. "^Water$" will only accept exact that title starting and ending with that word).
I will place that script as a cron job to be executed at least everyday (or alternatively once at startup).
+*The following output will be displayed on console:*+
# python client-htsp-epg-movie-mailer.py
[*] Creating socket ...
[*] Say hello ...
[-] Server answers:
Servername: HTS Tvheadend
Serverversion: 3.4~wheezy
HTSP version: 10
[*] Authenticating ...
[*] Authentication succeeded
[*] Using pysqlite version 2.6.0
[*] Using SQLite version 3.7.13
[*] Connected to SQLite database epgEventsMatched.db
[*] Created new SQLite database epgEventsMatched.db
[*] Searching for regular expression: Tatort
[*] Match(es) found!
Tatort: Letzte Tage
Tatort: Schutzlos
Tatort: Schutzlos
Tatort: Borowski und der Engel
[...]
[*] No backup file yet exists ... creating one
[---------------
[-] Title: Der Tatortreiniger
[-] Description: Ja, ich will
[-] Schedule: 22.07.2015 | 22:00 to - 22:30 on channel 13
[---------------
[-] Title: Der Tatortreiniger
[-] Description: Tauschgeschäfte
[-] Schedule: 23.07.2015 | 22:00 to - 22:30 on channel 13
[---------------
[-] Title: Tatort
[-] Description: Eine Leiche zuviel
[-] Schedule: 21.07.2015 | 22:00 to - 23:30 on channel 13
[---------------
[-] Title: Tatort - Brandmal
[-] Description: Bei einem Brand in einem Mietshaus im rechtsrheinischen Stadtteil Kalk stirbt eine junge Frau an den Folgen einer Rauchvergiftung. Ersten Ergebnissen zufolge handelt es sich um Brandstiftung mit Todesfolge. Die Bestürzung des Vermieters ist groß, sein Urteil eindeutig: "Das können nur die Zigeuner gewesen sein!" Seitdem im Viertel ein Heim für Sinti und Roma aufgemacht hat, sei es immer wieder zu Konflikten zwischen den Flüchtlingen aus dem früheren Jugoslawien und den Einheimischen gekommen. Eine Anwohnerinitiative fordert die Schließung des Flüchtlingsheims und kämpft gegen das Bleiberecht für "kriminelle Ausländer".
[-] Schedule: 02.07.2015 | 20:15 to - 21:40 on channel 28
[-] Schedule: 02.07.2015 | 20:15 to - 21:40 on channel 27
[...]
Successfully sent email
[*] Disconnected from DB epgEventsMatched.db
+*UPDATE - 27.06.2015:*+
Sorry, I missed to attach the referenced files from the HTSP python client library I use from the tvheadend sources. Now these dependencies should be attached in the ZIP file (client-htsp-epg-movie-mailer-release_20150627-v01.zip).
+*Download:*+
The file is attached: client-htsp-epg-movie-mailer-release_20150627-v01.py