[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)
(2014-04-06, 13:59)Elessar88 Wrote: Fixed it by adding python
Code:
<setting id="player_starts" value=" python /storage/downloads/playerstart.py" />

Moreover, is there a way to find out the title of the movie/episode that is playing?
I tried:
Code:
if xbmc.getInfoLabel('VideoPlayer.Season') != "" and xbmc.getInfoLabel('VideoPlayer.TVShowTitle') != "":
   type = "episode" + xbmc.getInfoLabel('VideoPlayer.TVShowTitle')[/align]

and in my python script I call:
Code:
import sys

if 'movie' in sys.argv[1].lower():
    os.system("milight 0 C 40")
elif 'friends' in sys.argv[1].lower():
    os.system("milight 0 C 220")

But this does not work.

Since you seem adept at writing python, why not just put your python code directly in the default.py of the add-on in the class "MyPlayer" under the " def onPlayBackStarted(self):" method?
You can then use "self.getVideoInfoTag" to get the tag of the currently playing file and then "getTitle" to get the title...

See http://mirrors.xbmc.org/docs/python-docs.../xbmc.html
Reply


Messages In This Thread
Great! - by gnorf - 2013-02-27, 22:50
RE: [RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...) - by KenV99 - 2014-04-06, 14:55
[RELEASE] Pilulli Revisited - by KenV99 - 2014-06-28, 18:18
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Execute user scripts on specific XBMC actions (play starts/stops...)4