2014-07-03, 00:50
I'm very new to python so I'm just experimenting making a little script at the moment however I'm having trouble checking if xbmc is playing: I've got this section of code however the if statement is always passed even when something is playing. I thought that xbmc.Player().isPlaying() should return true when something is playing, I've probably got something wrong somewhere but anyway here's the code:
Can someone point out what's wrong?
PHP Code:
def _play_episode(self, genre) :
xbmc.executebuiltin("PlayMedia("+ str(self._playlist_path(genre)) +".xsp)")
if xbmc.Player().isPlaying() :
if info == "true" :
xbmc.executebuiltin("ActivateWindow(fullscreeninfo)")
time.sleep(dur)
xbmc.executebuiltin("Dialog.Close(fullscreeninfo)")
exit()
else :
exit()
else :
self._error_msg(genre)
exit()
Can someone point out what's wrong?