def process_clicked_item(self, clicked_item):
if isinstance(clicked_item, xbmcgui.ListItem ):
di_url=clicked_item.getProperty('onClick_action') #this property is created when assembling the kwargs.get("listing") for this class
item_type=clicked_item.getProperty('item_type').lower()
elif isinstance(clicked_item, xbmcgui.ControlButton ):
#buttons have no setProperty() hiding it in Label2 no good.
#ast.literal_eval(cxm_string):
#di_url=clicked_item.getLabel2()
#log(' button label2='+repr(di_url))
#item_type=clicked_item.getProperty('item_type').lower()
pass
log( " clicked %s IsPlayable=%s url=%s " %( repr(clicked_item),item_type, di_url ) )
if item_type=='playable':
#a big thank you to spoyser (http://forum.kodi.tv/member.php?action=profile&uid=103929) for this help
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
pl.add(di_url, clicked_item)
xbmc.Player().play(pl, windowed=False)
elif item_type=='script':
#if user clicked on 'next' we close this screen and load the next page.
if 'mode=listSubReddit' in di_url:
self.busy_execute_sleep(di_url,500,True )
else:
self.busy_execute_sleep(di_url,3000,False )
评论列表
文章目录