| | |
- __builtin__.object
-
- InfoTagMusic
- InfoTagVideo
- Keyboard
- Language
- PlayList
- PlayListItem
- Player
- Settings
class Language(__builtin__.object) |
| |
Language class.
Language(scriptPath, defaultLanguage) -- Creates a new Language class.
scriptPath : string - path to script. (eg os.getcwd())
defaultLanguage : [opt] string - default language to fallback to. (default=English)
*Note, language folder structure is eg(language/English/strings.xml)
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:
- self.Language = xbmc.Language(os.getcwd()) |
| |
Methods defined here:
- getLocalizedString(...)
- getLocalizedString(id) -- Returns a localized 'unicode string'.
id : integer - id# for string you want to localize.
*Note, getLocalizedString() will fallback to XBMC strings if no string found.
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:
- locstr = self.Language.getLocalizedString(id=6)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class PlayList(__builtin__.object) |
| |
PlayList class.
PlayList(int playlist) -- retrieve a reference from a valid xbmc playlist
int playlist can be one of the next values:
0 : xbmc.PLAYLIST_MUSIC
1 : xbmc.PLAYLIST_VIDEO
Use PlayList[int position] or __getitem__(int position) to get a PlayListItem. |
| |
Methods defined here:
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __len__(...)
- x.__len__() <==> len(x)
- add(...)
- add(url[, listitem, index]) -- Adds a new file to the playlist.
url : string or unicode - filename or url to add.
listitem : [opt] listitem - used with setInfo() to set different infolabels.
index : [opt] integer - position to add playlist item. (default=end)
*Note, 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:
- playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
- video = 'F:\\movies\\Ironman.mov'
- listitem = xbmcgui.ListItem('Ironman', thumbnailImage='F:\\movies\\Ironman.tbn')
- listitem.setInfo('video', {'Title': 'Ironman', 'Genre': 'Science Fiction'})
- playlist.add(url=video, listitem=listitem, index=7)
- clear(...)
- clear() -- clear all items in the playlist.
- getposition(...)
- getposition() -- returns the position of the current song in this playlist.
- load(...)
- load(filename) -- Load a playlist.
clear current playlist and copy items from the file to this Playlist
filename can be like .pls or .m3u ...
returns False if unable to load playlist
- remove(...)
- remove(filename) -- remove an item with this filename from the playlist.
- shuffle(...)
- shuffle() -- shuffle the playlist.
- size(...)
- size() -- returns the total number of PlayListItems in this playlist.
- unshuffle(...)
- unshuffle() -- unshuffle the playlist.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Player(__builtin__.object) |
| |
Player class.
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:
- disableSubtitles(...)
- DisableSubtitles() -- disable subtitles
- getMusicInfoTag(...)
- getMusicInfoTag() -- returns the MusicInfoTag of the current playing 'Song'.
Throws: Exception, if player is not playing a file or current file is not a music file.
- getPlayingFile(...)
- getPlayingFile() -- returns the current playing file as a string.
Throws: Exception, if player is not playing a file.
- getSubtitles(...)
- getSubtitles() -- get subtitle stream name
- getTime(...)
- getTime() -- Returns the current time of the current playing media as fractional seconds.
Throws: Exception, if player is not playing a file.
- getTotalTime(...)
- getTotalTime() -- Returns the total time of the current playing media in
seconds. This is only accurate to the full second.
Throws: Exception, if player is not playing a file.
- getVideoInfoTag(...)
- getVideoInfoTag() -- returns the VideoInfoTag of the current playing Movie.
Throws: Exception, if player is not playing a file or current file is not a movie file.
Note, this doesn't work yet, it's not tested
- isPlaying(...)
- isPlayingAudio() -- returns True is xbmc is playing a file.
- isPlayingAudio(...)
- isPlayingAudio() -- returns True is xbmc is playing an audio file.
- isPlayingVideo(...)
- isPlayingVideo() -- returns True if xbmc is playing a video.
- onPlayBackEnded(...)
- onPlayBackEnded() -- onPlayBackEnded method.
Will be called when xbmc stops playing a file
- onPlayBackStarted(...)
- onPlayBackStarted() -- onPlayBackStarted method.
Will be called when xbmc starts playing a file
- onPlayBackStopped(...)
- onPlayBackStopped() -- onPlayBackStopped method.
Will be called when user stops xbmc playing a file
- pause(...)
- pause() -- Pause playing.
- play(...)
- play([item, listitem, windowed]) -- 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)
- playnext(...)
- playnext() -- Play next item in playlist.
- playprevious(...)
- playprevious() -- Play previous item in playlist.
- playselected(...)
- playselected() -- Play a certain item from the current playlist.
- seekTime(...)
- seekTime() -- Seeks the specified amount of time as fractional seconds.
The time specified is relative to the beginning of the
currently playing media file.
Throws: Exception, if player is not playing a file.
- setSubtitles(...)
- setSubtitles() -- set subtitle file and enable subtitles
- stop(...)
- stop() -- Stop playing.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Settings(__builtin__.object) |
| |
Settings class.
Settings(path) -- Creates a new Settings class.
path : string - path to script. (eg special://home/scripts/Apple Movie Trailers)
*Note, settings folder structure is eg(resources/settings.xml)
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:
- self.Settings = xbmc.Settings(path=os.getcwd()) |
| |
Methods defined here:
- getSetting(...)
- getSetting(id) -- Returns the value of a setting as a string.
id : string - id of the setting that the module needs to access.
*Note, You can use the above as a keyword.
example:
- apikey = self.Settings.getSetting('apikey')
- openSettings(...)
- openSettings() -- Opens this scripts settings dialog.
example:
- self.Settings.openSettings()
- setSetting(...)
- setSetting(id, value) -- Sets a script setting.
id : string - id of the setting that the module needs to access.
value : string or unicode - value of the setting.
*Note, You can use the above as keywords for arguments.
example:
- self.Settings.setSetting(id='username', value='teamxbmc')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |