2014-12-03, 17:47
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.
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.
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.