2013-07-21, 01:09
Are they started from scratch every time the user makes an action or are they started only once?
(2013-07-23, 02:55)ololoe Wrote: I don't see anything about services.http://wiki.xbmc.org/index.php?title=HOW...g_services
(2013-07-23, 19:59)ololoe Wrote: Why are they needed?They are running in the background all the time and are started with xbmc. Normal scripts are executed by the user when needed.
(2013-07-23, 21:02)ololoe Wrote: So is it possible to make an addon that catches all play events and logs vide urls?Sure! Its not very complicated. I modified a service addon for you (title and url are logged), you only have to change the logfile path:
import xbmc
class PlayerEvents(xbmc.Player):
def onPlayBackStarted(self):
xbmc.sleep(1000)
logFile = "D:\\urls.log"
title = xbmc.getInfoLabel('VideoPlayer.Title')
url = xbmc.Player().getPlayingFile()
fh = open(logFile, 'a')
fh.write(title+" - "+url+"\n")
fh.close()
player=PlayerEvents()
while (not xbmc.abortRequested):
xbmc.sleep(100)