Container.NumItems and System.CurrentControlID in Kodi Leia
#1
Hi,

I am using following code in my addon with its own WindowXML:
Code:
<label>($INFO[Container.NumItems]) Items - Page ($INFO[Container.CurrentPage]/$INFO[Container.NumPages])</label>

This works fine in Kodi Krypton and below.

In Kodi Leia it only works if I specify a container id like this: 
Code:
Container(50).NumItems

As there is more than one view this code only works when the view with id 50 is selected.

So I tried this:
Code:
Container(System.CurrentControlID).NumItems

This also works only in Kodi Krypton and below.

What can I do to show the number of items in Kodi Leia?

Regards
Malte
Reply
#2
and the container is the built-in container, right?

i have no issues in leia with Container.NumItems and multiple views, when using the built-in container...
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
#3
Quote:and the container is the built-in container, right?
Yes, sorry, forgot to add this.
Quote:i have no issues in leia with 
Code:
Container.NumItems
 and multiple views, when using the built-in container...      

I updated my test script from previous issue and I can reproduce the issue as described above. Works with Krypton, does not work with Leia.

Test script

I am running a nightly build from last week: "Kodi (18.0-ALPHA1 Git:20171229-f3271af). Platform: Windows NT x86 64-bit"

Could you have a look what is wrong with my script?
Reply
#4
ah, in leia you need to set the isMedia param to true for media windows.
see: https://codedocs.xyz/xbmc/xbmc/group__py...ml#details

def __init__(self, strXMLname, strFallbackPath, strDefaultName, forceFallback, isMedia):

ui = UIGameDB("script-main.xml", addonPath, "Default", "720p", True)
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
#5
Ouch. I was sure I already changed this. Sorry for bothering you with this.
Reply

Logout Mark Read Team Forum Stats Members Help
Container.NumItems and System.CurrentControlID in Kodi Leia0