2015-06-18, 08:56
Hi everybody, I have some question again. I have extend the class of Player as this:
I am passing the playlist to play method. and it will automatically plays next video after end the current video.
My question is:
Does it exists method for detecting the playing I want something for check as viewed when the next list item started play. but can't find the solution. on playnext, and onPlayBackStarted functions doesn't call on next file started play.
PHP Code:
class MyPlayer(xbmc.Player):
def __init__(self, *args, **kwargs):
xbmc.Player.__init__(self)
# @staticmethod
def play(self, item = None, listitem = None, windowed = True, startpos = -1):
# tlog('GET_CURRENT_FILE')
tlog("GET_CURRENT_FILE=" + str(item))
# super(xbmc.PLAYER_CORE_AUTO).play(item, listitem, windowed, startpos)
# MyPlayer(xbmc.PLAYER_CORE_AUTO).play(item, listitem, windowed, startpos)
# self.play(item, listitem, windowed, startpos)
super(MyPlayer, self).play(item, listitem, windowed, startpos)
# while self.isPlaying():
# xbmc.sleep(1000)
# @classmethod
# def onQueueNextItem(self):
# super(MyPlayer,self).onQueueNextItem()
def getPlayingFile(self):
tlog("GET_PLAYING_FILE_CALLED")
return super(MyPlayer, self).getPlayingFile()
def onPlayBackStarted(self):
# tlog('ONPLAYBACKSTARTED')
# print("ONPLAYBACKSTARTED")
tlog('START PLAYED FILE=' + self.getPlayingFile())
# super(MyPlayer, self).onPlayBackStarted()
# super(MyPlayer).onPlayBackStarted()
# xbmc.Player(xbmc.PLAYER_CORE_AUTO).onPlayBackStarted()
def playnext(self):
tlog('START NEXT FILE . . .')
super(MyPlayer, self).playnext()
I am passing the playlist to play method. and it will automatically plays next video after end the current video.
My question is:
Does it exists method for detecting the playing I want something for check as viewed when the next list item started play. but can't find the solution. on playnext, and onPlayBackStarted functions doesn't call on next file started play.