Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xbmc,xbmcgui
- import subprocess,os
- import time
- 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 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L03")
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L01")
- os.system('hyperion-remote --sourceAutoSelect')
- def onPlayBackEnded(self):
- if (VIDEO == 1):
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L04")
- def onPlayBackStopped(self):
- if (VIDEO == 1):
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L04")
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L01")
- def onPlayBackPaused(self):
- if xbmc.Player().isPlayingVideo():
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L04")
- def onPlayBackResumed(self):
- if xbmc.Player().isPlayingVideo():
- os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl thomasvdalen@gmail.com 4845488$ctugT$! 192.168.1.8 issue_device_command 13630846 L03")
- time.sleep(3)
- os.system('hyperion-remote --sourceAutoSelect')
- 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