

But the question is: if I can define an URL on the ListItem using setPath(), then why should I also fill that URL when appending the ListItem to my listing list_items.append((url, li, True)) ? Url = li.getPath() #I retrieve the URL defined in the above function So currently, my workaround is li = data_to_listitem(data) This looks weird since it means you have to know the URL outside the function that builds the item. Which seems ok to me (an url is set to the item itself)īut then, it seems that you also need to set the URL when adding the item to the list, li = data_to_listitem(data) It seems that it can be defined within xbmcgui.ListItem using list_tPath(url) I don't understand well how to interact with the media url. #here I parse my data to build a xbmcgui.ListItem This create a xbmcgui.ListItem for our listing def data_to_listitem(data):

This builds a list of items for the virtual folder def datas_to_list(datas): Xbmcplugin.addSortMethod(, xbmcplugin.SORT_METHOD_LABEL) Xbmcplugin.addDirectoryItems(, listing, len(listing)) Sortable_by = (xbmcplugin.SORT_METHOD_DATE, #this is were I get my datas (from internet) This is my KODI menu function def menu_live(): I cannot understand how correctly create a virtual folder with items using xbmcplugin.addDirectoryItems. I'm trying to update a plugin for Kodi 19 (and Python3).īut! Hell! Their documentation is a mess, and when you search the internet, a lot of code is outdated.
