- channel=dict()
- channel['name']=record.title.decode('utf-8')
- channel['url']=record.path.decode('utf-8')
- playlistgen.addItem(channel)
+ if record.title:
+ channel=dict()
+ channel['name']=record.title.decode('utf-8')
+ channel['url']=record.path.decode('utf-8')
+ try:
+ channel['tvg']=record.attrs['tvg-name'].decode('utf-8')
+ except:
+ None
+ try:
+ if record.attrs['group-title'] != 'None':
+ channel['group']=record.attrs['group-title'].decode('utf-8')
+ except:
+ None
+ try:
+ channel['country']=record.attrs['country'].decode('utf-8')
+ except:
+ None
+ try:
+ channel['logo']=record.attrs['tvg-logo'].decode('utf-8')
+ except:
+ None
+ playlistgen.addItem(channel)