2014-04-06, 14:55
(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