Displaying a python list
#1
Brick 
I've been cracking my head on this one, writing an script I have a python function that returns a list, all working since i can get it to display on the console but I want to display it on the bottom of the
Code:
fullscreenvideo-WINDOW_FULLSCREEN_VIDEO
based on a button press in the
Code:
playercontrols-WINDOW_DIALOG_PLAYER_CONTROLS
but cant figure how to interact with the gui from python
clearArt Concept
cdArt Concept

*If like, thank user
Reply
#2
python can communicate with the gui through window properties.
so that might be a possible solution?

if you want to display stuff on the fullscreen videowindow,
remember to use id="1" for all the controls you add,
else it won't show up on screen.
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
well thats where i get lost.
Been trying,I dont know if you mean something like
Code:
myVar = function****
xbmcgui.Window(12005).setProperty( 'MyProperty' ,  myVar)
and
Code:
<control type="label" id="1">
<description>Text to display</description>
<label>$INFO[Window(12005).Property(MyProperty)]</label>
etc...
</control>
I cant connect those two concepts, dont know why Confused
clearArt Concept
cdArt Concept

*If like, thank user
Reply
#4
works fine on my end.

here's the test script i used:
Code:
import xbmcgui

myVar = 'world'
xbmcgui.Window(12005).setProperty( 'MyProperty' ,  myVar)

and this is the label i've placed at the bottom of VideoFullScreen.xml:
Code:
            <control type="label" id="1">
                <posx>0</posx>
                <posy>0</posy>
                <width>600</width>
                <height>25</height>
                <label>hello: $INFO[Window(12005).Property(MyProperty)]</label>
                <font>font13</font>
                <textcolor>white</textcolor>
            </control>

the exact same code should work on your end as well.
might be a good starting point to track down why your code doesn't work.
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
well is exactly what I have so I am in the correct path.
What caught my attention is the VideoFullScreen.xml file you add the control to, i am adding the control to name.xml inside my resources/skins/Default/720p/ , folder

That have something to do ?

my file name.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window>
    <controls>
        <control type="label" id="1">
                <posx>0</posx>
                <posy>0</posy>
                <width>600</width>
                <height>25</height>
                <label>$INFO[Window(12005).Property(MyProperty)]</label>
                <font>font13</font>
                <textcolor>white</textcolor>
        </control>
    </controls>
</window>

and to test I add some logs to debug in the console
Code:
import xbmcgui

myVar = 'test_label'
print ('playback started')
xbmcgui.Window(12005).setProperty( 'MyProperty' ,  myVar)
print ('way past what I am suppose to display')

*in fact if I add the control to the existing VideoFullScreen.xml it shows. soo How I add that to my own xml inside my addon ?
clearArt Concept
cdArt Concept

*If like, thank user
Reply
#6
Maybe is something the skinners have to implement from their side and i cant set it from mine(addon side), I could also try and create the controls directly from python with something like
Code:
class ControlLabel(Control)
don't know if that could work.

BTW, Thanks a lot Ronie Big Grin !
clearArt Concept
cdArt Concept

*If like, thank user
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Displaying a python list00
This forum uses Lukasz Tkacz MyBB addons.