2013-05-15, 21:15
Should work like that.
Code:
class MyPlayer(xbmc.Player):
def _init_ (self):
xbmc.Player._init_(self)
def onPlayBackStarted(self):
if xbmc.Player().isPlayingVideo():
currentPlayingFile = xbmc.Player().getPlayingFile()
if re.search(r'3D.OU', currentPlayingFile, re.I):
xbmc.sleep(500)
response = xbmc.executebuiltin("Action(3dmodetab)")
if re.search(r'3D.SBS', currentPlayingFile, re.I):
xbmc.sleep(500)
response = xbmc.executebuiltin("Action(3dmodesbs)")
def onPlayBackEnded(self):
response = xbmc.executebuiltin("Action(3dmodeoff)")
def onPlayBackStopped(self):
response = xbmc.executebuiltin("Action(3dmodeoff)")
player=MyPlayer()
while(1):
xbmc.sleep(500)