Fix TypeError for setting ListItem streams

This commit is contained in:
tomkat83 2017-03-19 13:13:04 +01:00
parent 319afd4f99
commit 6e2751a695

View file

@ -22,6 +22,8 @@ def convert_PKC_to_listitem(PKC_listitem):
if data['info']: if data['info']:
listitem.setInfo(**data['info']) listitem.setInfo(**data['info'])
for stream in data['stream_info']: for stream in data['stream_info']:
# Kodi documentation up to date? CAREFUL as type= seems to be cType=
# and values= seems to be dictionary=
listitem.addStreamInfo(**stream) listitem.addStreamInfo(**stream)
if data['art']: if data['art']:
listitem.setArt(data['art']) listitem.setArt(data['art'])
@ -90,7 +92,7 @@ class PKC_ListItem(object):
- Subtitle Values: - Subtitle Values:
- language : string (en) - language : string (en)
""" """
self.data['stream_info'].append({'type': type, 'values': values}) self.data['stream_info'].append({'cType': type, 'dictionary': values})
def getLabel(self): def getLabel(self):
""" """