General functions on Kodi.
Offers classes and functions that provide information about the media currently playing and that allow manipulation of the media player (such as starting a new song). You can also find system information using the functions available in this library.
Topics | |
InfoTagGame | |
Kodi's game info tag class. | |
InfoTagMusic | |
Kodi's music info tag class. | |
InfoTagPicture | |
Kodi's picture info tag class. | |
InfoTagRadioRDS | |
Kodi's radio RDS info tag class. | |
Actor | |
Actor class used in combination with InfoTagVideo. | |
VideoStreamDetail | |
Video stream details class used in combination with InfoTagVideo. | |
AudioStreamDetail | |
Audio stream details class used in combination with InfoTagVideo. | |
SubtitleStreamDetail | |
Subtitle stream details class used in combination with InfoTagVideo. | |
InfoTagVideo | |
Kodi's video info tag class. | |
Keyboard | |
Kodi's keyboard class. | |
Monitor | |
Kodi's monitor class. | |
Player | |
Kodi's player. | |
PlayList | |
Kodi's Play List class. | |
RenderCapture | |
Kodi's render capture. | |
log | ( | ... | ) |
Function: xbmc.log(msg[, level])
msg | string - text to output. | ||||||||||||
level | [opt] integer - log level to output at. (default=LOGDEBUG)
|
LOGDEBUG
as the default logging level and to use conservative logging (log only if needed). Excessive logging makes it harder to debug kodi itself.Logging in kodi has a global configuration level that controls how text is written to the log. This global logging behaviour can be changed in the GUI (Settings -> System -> Logging) (debug toggle) or furthered configured in advancedsettings (loglevel setting).
Text is written to the log for the following conditions:
LOGINFO
, LOGWARNING
, LOGERROR
and LOGFATAL
) - Default kodi behaviourLOGNOTICE
to LOGDEBUG
LOGNOTICE
(use LOGINFO
) and LOGSEVERE
(use LOGFATAL
)Example:
shutdown | ( | ) |
Function: xbmc.shutdown()
Example:
restart | ( | ) |
Function: xbmc.restart()
Example:
executescript | ( | ... | ) |
Function: xbmc.executescript(script)
script | string - script filename to execute. |
Example:
executebuiltin | ( | ... | ) |
Function: xbmc.executebuiltin(function)
function | string - builtin function to execute. |
wait | [opt] bool - If Kodi should wait for the builtin function execution to finish (default False) |
Example:
executeJSONRPC | ( | ... | ) |
Function: xbmc.executeJSONRPC(jsonrpccommand)
jsonrpccommand | string - jsonrpc command to execute. |
Example:
sleep | ( | ... | ) |
Function: xbmc.sleep(time)
time | integer - number of msec to sleep. |
PyExc_TypeError | If time is not an integer. |
Example:
getLocalizedString | ( | ... | ) |
Function: xbmc.getLocalizedString(id)
id | integer - id# for string you want to localize. |
\language\{yourlanguage}\
for which id you need for a string.Example:
getSkinDir | ( | ) |
Function: xbmc.getSkinDir()
Example:
getLanguage | ( | ... | ) |
Function: xbmc.getLanguage([format], [region])
format | [opt] format of the returned language string
| ||||||||
region | [opt] append the region delimited by "-" of the language (setting) to the returned language string |
Example:
getIPAddress | ( | ) |
Function: xbmc.getIPAddress()
Example:
getDVDState | ( | ) |
Function: xbmc.getDVDState()
Value | Name |
---|---|
1 | xbmc.DRIVE_NOT_READY |
16 | xbmc.TRAY_OPEN |
64 | xbmc.TRAY_CLOSED_NO_MEDIA |
96 | xbmc.TRAY_CLOSED_MEDIA_PRESENT |
Example:
getFreeMem | ( | ) |
Function: xbmc.getFreeMem()
Example:
getInfoLabel | ( | ... | ) |
Function: xbmc.getInfoLabel(infotag)
infotag | string - infoTag for value you want returned. |
Example:
getInfoImage | ( | ... | ) |
Function: xbmc.getInfoImage(infotag)
infotag | string - infotag for value you want returned |
List of InfoTags - http://kodi.wiki/view/InfoLabels
Example:
playSFX | ( | ... | ) |
Function: xbmc.playSFX(filename,[useCached])
filename | string - filename of the wav file to play |
useCached | [opt] bool - False = Dump any previously cached wav associated with filename |
Example:
stopSFX | ( | ) |
Function: xbmc.stopSFX()
Example:
enableNavSounds | ( | ... | ) |
Function: xbmc.enableNavSounds(yesNo)
yesNo | bool - enable (True) or disable (False) nav sounds |
Example:
getCondVisibility | ( | ... | ) |
Function: xbmc.getCondVisibility(condition)
condition | string - condition to check |
Example:
getGlobalIdleTime | ( | ) |
Function: xbmc.getGlobalIdleTime()
Example:
getCacheThumbName | ( | ... | ) |
Function: xbmc.getCacheThumbName(path)
path | string - path to file |
Example:
getCleanMovieTitle | ( | ... | ) |
Function: xbmc.getCleanMovieTitle(path[, usefoldername])
path | string - String to clean |
usefoldername | [opt] bool - use folder names (defaults to false) |
Example:
getRegion | ( | ... | ) |
Function: xbmc.getRegion(id)
id | string - id of setting to return |
Example:
getSupportedMedia | ( | ... | ) |
Function: xbmc.getSupportedMedia(media)
media | string - media type |
Example:
skinHasImage | ( | ... | ) |
Function: xbmc.skinHasImage(image)
image | string - image filename |
Example:
startServer | ( | ... | ) |
Function: xbmc.startServer(typ, bStart, bWait)
typ | integer - use SERVER_* constants
| ||||||||||||||||
bStart | bool - start (True) or stop (False) a server |
Example:
audioSuspend | ( | ) |
Function: xbmc.audioSuspend()
Example:
audioResume | ( | ) |
Function: xbmc.audioResume()
Example:
getUserAgent | ( | ) |
Function: xbmc.getUserAgent()
Returns Kodi's HTTP UserAgent string
Example:
example output: Kodi/17.0-ALPHA1 (X11; Linux x86_64) Ubuntu/15.10 App_Bitness/64 Version/17.0-ALPHA1-Git:2015-12-23-5770d28
convertLanguage | ( | ... | ) |
Function: xbmc.convertLanguage(language, format)
Returns the given language converted to the given format as a string.
language | string either as name in English, two letter code (ISO 639-1), or three letter code (ISO 639-2/T(B) | ||||||||
format | format of the returned language string
|
Example: