A little help with xmltv python script...
#1
I was happy to find this python script (add kodi addon) to import schedules direct data into tvheadend as an xmltv file...

https://github.com/astrilchuk/sd2xmltv

However, it was originally setup to replace the program genre with a short list of accepted strings. Now tvheadend (and other backends) can accept most of the program genre categories.

I'm hoping someone with a better understanding can take a quick look at the sd2xmltv.py file and recommend changes that will just import the actual genres that are in the schedules direct data.

On a separate note - there seems to be an issue pulling over the channel icon info into the xmltv file as well. Not sure where that is breaking.

Thanks for looking!!
Current Kodi addon projects: zap2epg, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3 and the occasional s905 box
If you like my work you can buy me a coffee!
Reply
#2
Solved this...looks like the code was already in there just hashed out. Here are the changes to make on lines 357-360 of the sd2xmltv.py file

PHP Code:
#        self._add_program_categories(p, channel, airing, program)

        
for genre in program.genres:
            
p.add_category(genre

You basically hash out the self._add_program_categories(p, channel, airing, program) line and delete the hash in front of the next two lines.

Now all genres will be output into the xmltv file!

...Now I just need to get the team at Tvheadend to pass all the category names through to kodi instead of trying to match the DVB list.
Current Kodi addon projects: zap2epg, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3 and the occasional s905 box
If you like my work you can buy me a coffee!
Reply

Logout Mark Read Team Forum Stats Members Help
A little help with xmltv python script...0