Using:
Code:
print xbmc.getInfoLabel( "ListItem.Title" )In my code prints the list Items label.Meaning xbmc has in someway information on the just accessed listItem.
However when trying to change the info with this code:
Code:
win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
focus_id = win.getFocusId()
# DEBUG just to get some feedback
print focus_id
print str(win.getControl( focus_id ).getSelectedPosition())
print win.getFocus().getSelectedPosition()
#
win.getFocus().getSelectedItem().setInfo('video', { playcount: 1 })Code:
00:16:20 T:4216 NOTICE: 50
00:16:20 T:4216 NOTICE: -1
00:16:20 T:4216 NOTICE: -1
00:16:20 T:4216 ERROR: Error Type: <type 'exceptions.AttributeError'>
00:16:20 T:4216 ERROR: Error Contents: 'NoneType' object has no attribute 'setInfo'
00:16:20 T:4216 ERROR: Traceback (most recent call last):
File "C:\Users\Popeye\XBMC\portable_data\addons\xbmc-pneumatic\default.py", line 804, in <module>
win.getFocus().getSelectedItem().setInfo('video', { playcount: 1 })
AttributeError: 'NoneType' object has no attribute 'setInfo'What am I doing wrong? What is the trick for manipulating listItems from xbmc (and not from my addon)?

Search
Help