skinning: dynamic content of list
#1
Hi,
sorry for my bad english
I have several problems with dynamic content of list control. I want to create a list of a few special plugins.
Problems:
1) how do I fill out the content of the list from plugin which has a list of other (my special) plugins? it is possible? how can i do this?
Examples from this page not helping http://kodi.wiki/view/Dynamic_List_Content, there is only example on the side xml files, but no examples for .py side
I need some examples

2) I looking for information about communication between kodi and their plugins/addons. Can i check out that my addon is working or finished the job? and when Kodi is turning off, during shutdown its own process whether sending some information to a running plugins?
Reply
#2
Is there anyone who can help me?

I'm know now how i should looks like:
myxmlfile.xml => and inside content of the list <content>plugin://script.content</content>
script.content is a name of my plugin

addon.py :

import xbmcgui
import xbmcplugin
import os
import sys

addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movies')
url = '/home/username/Downloads/myfile.mp4'
li = xbmcgui.ListItem('My First Video!')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)

xbmcplugin.endOfDirectory(addon_handle) #<=thats is necessary to display all items (in this case only one 'My First Video')
-------------------
but i need display item list with 'labels' and 'action', and i guess should use addContextMenuItems method

EXEMPLE: addon.py
import xbmcgui
import xbmcplugin
import os
import sys

addon_handle = int(sys.argv[1])
contextMenuItems = []
contextMenuItems.append(('Open window 1110', 'ActivateWindow(1110)'))

liz = xbmcgui.ListItem().addContextMenuItems(contextMenuItems, False)
------
but it's not displayed anything

I have system ubuntu 15.04
processor Intel® Core™2 Duo CPU T7500 @ 2.20GHz × 2
os type 64-bit
graphics Gallium 0.4 on NV86

I am asking for a quick answerSmile
Reply
#3
it's not possible to add context menu items in a list with dynamic content.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Thanks for you reply.

Now i see my mistake. So how can i get dynamic content of the list via addon with items ("label/name of item" and "action/build-in function")?
Or maybe is some signal/information to addon which tells that item from content is not foundSmile then i will catch this and use some action.
Reply
#5
Please, someone can help me?, I'm waiting..

I need dynamic list items with <onclick> function which let me run some action e.g. ActivateWindow(settings). Please tell my only what should i use to do itSmile

One more thingSmile i need get list IDs or names all addons for my script.. is there any possibility?
Reply
#6
moved to addon dev.

i have no idea if listitems can be an action instead of a playable url.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
OK thanks.

So i'm looking for and waiting for some solution.

Regards
Reply

Logout Mark Read Team Forum Stats Members Help
skinning: dynamic content of list0