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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
import os
CWD_PATH = os.getcwd()
pathMapping = {"special://xbmc/" : "/usr/share/xbmc",
"special://xbmcbin/" : "/usr/lib/xbmc",
"special://masterprofile/" : os.path.join(CWD_PATH, "userdata"),
"special://home/" : CWD_PATH,
"special://temp/" : os.path.join(CWD_PATH, "tmp")}
DRIVE_NOT_READY = 1
LOGDEBUG = 0
LOGERROR = 4
LOGFATAL = 6
LOGINFO = 1
LOGNONE = 7
LOGNOTICE = 2
LOGSEVERE = 5
LOGWARNING = 3
PLAYER_CORE_AUTO = 0
PLAYER_CORE_DVDPLAYER = 1
PLAYER_CORE_MPLAYER = 2
PLAYER_CORE_PAPLAYER = 3
PLAYLIST_MUSIC = 0
PLAYLIST_VIDEO = 1
TRAY_CLOSED_MEDIA_PRESENT = 96
TRAY_CLOSED_NO_MEDIA = 64
TRAY_OPEN = 16
class Player:
"""
Player([core]) -- Creates a new Player with as default the xbmc music playlist.
core : (optional) Use a specified playcore instead of letting xbmc decide the playercore to use.
: - xbmc.PLAYER_CORE_AUTO
: - xbmc.PLAYER_CORE_DVDPLAYER
: - xbmc.PLAYER_CORE_MPLAYER
: - xbmc.PLAYER_CORE_PAPLAYER
Methods defined here:
"""
player = None
def __init__(self, ptype):
self.player = ptype
def isPlaying(self):
"""
"""
def close(self):
"""
"""
def play(self, item=None, listitem=None, windowed=False):
"""
Play this item.
item : [opt] string - filename, url or playlist.
listitem : [opt] listitem - used with setInfo() to set different infolabels.
windowed : [opt] bool - true=play video windowed, false=play users preference.(default)
*Note, If item is not given then the Player will try to play the current item
in the current playlist.
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- listitem = xbmcgui.ListItem('Ironman')
- listitem.setInfo('video', {'Title': 'Ironman', 'Genre': 'Science Fiction'})
- xbmc.Player( xbmc.PLAYER_CORE_MPLAYER ).play(url, listitem, windowed)
print self.player, " plays ", stream_url, " ( " + str(item) + " ) "
"""
class Keyboard:
def __init__( self, default, heading, hidden ):
"""
"""
def translatePath(path):
return pathMapping[path]
def executebuiltin(ex):
print "executebuiltin => ", ex
|