Context menu - get listitem data
#16
(2019-08-25, 18:10)sualfred Wrote: My embuary skin. Skins are mostly provided by my embuary helper script. All of them have the correct mediatype + dbid set

Edit:
But I also get "None" returned in libraries. The IDs are correct.

Code:

2019-08-25 18:11:06.848 T:27260  NOTICE: [ script.embuary.helper ] windowID 10025
2019-08-25 18:11:06.848 T:27260  NOTICE: [ script.embuary.helper ] win <xbmcgui.Window object at 0x0000015E70DC57D8>
2019-08-25 18:11:06.848 T:27260  NOTICE: [ script.embuary.helper ] cid 56
2019-08-25 18:11:06.848 T:27260  NOTICE: [ script.embuary.helper ] ctrl <xbmcgui.ControlList object at 0x0000015E70E97698>
2019-08-25 18:11:06.856 T:27260  NOTICE: [ script.embuary.helper ] None
I'm going to install and test against Kodi nightly, perhaps something broke.

I was unable to reproduce the issue (sys.listitem not filling) with v18.3.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#17
I'm running 18.3. It does not work anywhere.
 
Code that I'm using:

Code:

def test(params):
    windowID = xbmcgui.getCurrentWindowId()
    xbmc.log('windowID ' + str(windowID),level=xbmc.LOGNOTICE)
    win = xbmcgui.Window(windowID)
    controlID = win.getFocusId()
    xbmc.log('controlID ' + str(controlID),level=xbmc.LOGNOTICE)
    control = win.getControl(controlID)
    xbmc.log('control ' + str(control),level=xbmc.LOGNOTICE)
    listitem = control.getSelectedItem()
    xbmc.log('listitem ' + str(listitem),level=xbmc.LOGNOTICE)
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#18
Played with it again and I just can confirm that getSelectedItem() returns None in all cases if I'm trying to access a cList item that is not created by the same Python instance. If I add an item to the control via .addItem('bla') it removes all other listitems and replaces them with my new one and THEN I'm able to get the listitem data of the new one.  No None anymore. Grml.

Anyway, if you know any other way please let me know.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#19
I am also interested in having this functionality fixed that would be important

in the netflix addon have the possibility to update the properties of an item such as context menu
this would save many update operations,
because now we are obliged to update the entire list of objects,
it's a huge job and takes a very long time!!
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#20
I found the solution in the Skin Helper Service code here: https://github.com/kodi-community-addons...log.py#L81

basically you have to add:
python:
if xbmc.getCondVisibility("Window.IsActive(busydialog)"):
    xbmc.executebuiltin("Dialog.Close(busydialog)")
    xbmc.sleep(500)

before doing xbmc.getInfoLabel...
Reply

Logout Mark Read Team Forum Stats Members Help
Context menu - get listitem data0