Advertisement
Guest User

Untitled

a guest
Dec 25th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 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. os.system('/opt/hyperion/bin/hyperion-remote --priority 100 --duration 86400 --effect "Blue mood blobs"')
  18.  
  19. def onPlayBackStopped(self):
  20. if (VIDEO == 1):
  21. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
  22. os.system('/opt/hyperion/bin/hyperion-remote --priority 100 --duration 86400 --effect "Blue mood blobs"')
  23.  
  24. def onPlayBackPaused(self):
  25. if xbmc.Player().isPlayingVideo():
  26. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
  27.  
  28. def onPlayBackResumed(self):
  29. if xbmc.Player().isPlayingVideo():
  30. os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L03")
  31. os.system('/opt/hyperion/bin/hyperion-remote --clear')
  32.  
  33. player=MyPlayer()
  34.  
  35. while(1):
  36. if xbmc.Player().isPlayingVideo():
  37. VIDEO = 1
  38.  
  39. else:
  40. VIDEO = 0
  41.  
  42. xbmc.sleep(3000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement