2016-04-16, 17:30
I'm developing a service add-on that needs to do stuff when a TV channel is changed.
I thought I'd be able to wait with onPlayBackStarted() in the Player class but it doesn't seem to wait/block.
Here is my code to test:
It seems that onPlayBackStarted() is not blocking and it is returning false, because the above just prints "foo" repeatedly.
I thought I'd be able to wait with onPlayBackStarted() in the Player class but it doesn't seem to wait/block.
Here is my code to test:
Code:
player = xbmc.Player()
while True:
xbmc.log("foo")
if player.onPlayBackStarted():
xbmc.log("Changed to: " + player.getPlayingFile())
It seems that onPlayBackStarted() is not blocking and it is returning false, because the above just prints "foo" repeatedly.