Skip to content
/ horepg Public
forked from beralt/horepg

A simple translator between the Horizion JSON format and the XMLTV format

License

Notifications You must be signed in to change notification settings

RobM83/horepg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

horepg

This simple script parses EPG data from the service at horizon.tv (which is used by a product sold by a digital cable provider in the Netherlands). The original data is formatted JSON. This script translated that to the XMLTV format and passes that to TVHeadend using the 'external grabber' interface. This interface is a Unix socket which is read by TVHeadend.

Configuration

You should select the channels by modifying the script a bit. Note that channel display names have to match the ones in your TVHeadend configuration for this to work. There is a variable called add_display_name in the XMLTVDocument class to help with remapping. Setting this to:

add_display_name = {'NPO 1 HD': ['NPO 1']}

remappes NPO 1 HD to NPO 1. Note that although multiple display names are supported by XMLTV this is not the case for TVHeadend.

Configuration of the wanted channels is done by adding and removing channels to the wanted_channels list. A preliminary list is available by default.

Usage

Execute

$ python horepg.py

as the user you are running TVHeadend as. This is probably the hts user.

Improvements

This could use a daemon mode, while being able to drop privileges to that of the hts user. A systemd service file (or upstart) would be nice. It would be nice to stop the whole reconnecting for each channel thingy. Maybe this should be a proper xmltv parser.

About

A simple translator between the Horizion JSON format and the XMLTV format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%