Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. import xbmc,xbmcgui
  2. import subprocess,os
  3.  
  4. class MyPlayer(xbmc.Player) :
  5.  
  6. def __init__ (self):
  7. xbmc.Player.__init__(self)
  8.  
  9. def onPlayBackStarted(self):
  10. if xbmc.Player().isPlayingVideo():
  11. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L03")
  12. os.system('/opt/hyperion/bin/hyperion-remote --clear')
  13.  
  14. def onPlayBackEnded(self):
  15. if (VIDEO == 1):
  16. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
  17.  
  18. def onPlayBackStopped(self):
  19. if (VIDEO == 1):
  20. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
  21.  
  22. def onPlayBackPaused(self):
  23. if xbmc.Player().isPlayingVideo():
  24. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
  25.  
  26. def onPlayBackResumed(self):
  27. if xbmc.Player().isPlayingVideo():
  28. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L03")
  29.  
  30. player=MyPlayer()
  31.  
  32. while(1):
  33. if xbmc.Player().isPlayingVideo():
  34. VIDEO = 1
  35.  
  36. else:
  37. VIDEO = 0
  38.  
  39. xbmc.sleep(3000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement