-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCustomPlayer.py
More file actions
38 lines (30 loc) · 1020 Bytes
/
CustomPlayer.py
File metadata and controls
38 lines (30 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- coding: utf-8 -*-
import xbmc
class MyXBMCPlayer(xbmc.Player):
def __init__( self, *args, **kwargs ):
self.is_active = True
self.urlplayed = False
self.pdialogue=None
print "#XBMCPlayer#"
#def play(self, url, listitem):
# print 'Now im playing... %s' % url
# self.is_active = False
# self.urlplayed = False
# xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, listitem)
#def setdialogue( self, pdialogue ):
# self.pdialogue=pdialogue
def onPlayBackStarted( self ):
print "#Playback Started#"
try:
print "#Im playing :: "
except:
print "#I failed get what Im playing#"
if (self.pdialogue):
self.pdialogue.close()
self.urlplayed = True
def onPlayBackEnded( self ):
print "#Playback Ended#"
self.is_active = False
def onPlayBackStopped( self ):
print "## Playback Stopped ##"
self.is_active = False