Solved Help with WindowXMLDialog
#1
Please don't laugh if this is all wrong... I am just trying to figure out python and am just learning.
I am trying to get a WindowXMLDialog to popup when a video is playing and close after the video stops.
I am successful getting it to popup when the video starts but can't figure out how to get it to close after the video stops.
It seems to me that it would close when the video stops and the while condition is not met anymore
but it stays open. Am I going about this all wrong or am I even close? Any help is appreciated. Thanks.

PHP Code:
def PlayerDialogTest(self):
        while (
not xbmc.abortRequested) and WIN.getProperty("player.running"):
            if( 
xbmc.Player().isPlayingVideo() == True):
                    
popup ChildClass"test.xml" __cwd__"Default")
                    
popup .doModal()
                    
del popup
            
else:
                if( 
xbmc.Player().isPlayingVideo() == False):
                    continue
            
xbmc.sleep(1000)
        
WIN.clearProperty('player.running'

Solved by implementing some of the the basics of this post. Thanks again Unfledged for your wit, wisdom, and expertise. You can help a guy out without even knowing it. Wink
Reply
#2
perhaps you don´t even need python Wink
just create a dialog in xml and put <visible>Window.Isactive(fullscreenvideo)</visible> in window header. (between <window> and <controls>)
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
(2014-12-03, 19:58)phil65 Wrote: perhaps you don´t even need python Wink
just create a dialog in xml and put <visible>Window.Isactive(fullscreenvideo)</visible> in window header. (between <window> and <controls>)

I guess I should have stated that the video is being played in a videowindow and not a fullscreen window. Could that still work somehow?
Also the xml is located in a Default addon skin directory. Would it need to be in a regular skin xml directory and be skin dependent?
I'm trying to make the addon/script to not depend on any one skin. thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Help with WindowXMLDialog0