Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xbmc,xbmcgui
- import subprocess,os
- class MyPlayer(xbmc.Player) :
- def __init__ (self):
- xbmc.Player.__init__(self)
- def onPlayBackStarted(self):
- if xbmc.Player().isPlayingVideo():
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L03")
- os.system('/opt/hyperion/bin/hyperion-remote --clear')
- def onPlayBackEnded(self):
- if (VIDEO == 1):
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
- os.system('/opt/hyperion/bin/hyperion-remote --priority 100 --duration 86400 --effect "Blue mood blobs"')
- def onPlayBackStopped(self):
- if (VIDEO == 1):
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
- os.system('/opt/hyperion/bin/hyperion-remote --priority 100 --duration 86400 --effect "Blue mood blobs"')
- def onPlayBackPaused(self):
- if xbmc.Player().isPlayingVideo():
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L04")
- def onPlayBackResumed(self):
- if xbmc.Player().isPlayingVideo():
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488T 192.168.1.11 issue_device_command 13630846 L03")
- os.system('/opt/hyperion/bin/hyperion-remote --clear')
- player=MyPlayer()
- while(1):
- if xbmc.Player().isPlayingVideo():
- VIDEO = 1
- else:
- VIDEO = 0
- xbmc.sleep(3000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement