add-ons / service.iptv.manager

Integrate TV and radio channels with EPG data from other add-ons in Kodi PVR.
https://github.com/add-ons/service.iptv.manager/wiki
GNU General Public License v3.0
95 stars 28 forks source link

Support more than one genre for an episode #39

Closed dagwieers closed 3 years ago

dagwieers commented 3 years ago

This supports more than one genre in the XMLTV output.

VRT NU can have more than one category for a tv show episode or a movie.

dagwieers commented 3 years ago

Another option is that we deprecate genre and introduce genres which is always a list.

                    # NOTE: Backward compatibility with earlier format
                    if item.get('genre'):
                        program += ' <category>{genre}</category>\n'.format(
                            genre=cls._xml_encode(item.get('genre')))

                    if item.get('genres') and isinstance(item.get('genres'), list):
                        for genre in item.get('genres'):
                            program += ' <category>{genre}</category>\n'.format(
                                genre=cls._xml_encode(genre))
michaelarnauts commented 3 years ago

I prefer to keep it at genre, so checking if it's a list does the trick.