Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

Kodi's monitor class.

Class: xbmc.Monitor()

Creates a new monitor to notify addon about changes.

Function Documentation

◆ onSettingsChanged()

onSettingsChanged ( )

Function: onSettingsChanged()


onSettingsChanged method.

Will be called when addon settings are changed

◆ onScreensaverActivated()

onScreensaverActivated ( )

Function: onScreensaverActivated()


onScreensaverActivated method.

Will be called when screensaver kicks in

◆ onScreensaverDeactivated()

onScreensaverDeactivated ( )

Function: onScreensaverDeactivated()


onScreensaverDeactivated method.

Will be called when screensaver goes off

◆ onDPMSActivated()

onDPMSActivated ( )

Function: onDPMSActivated()


onDPMSActivated method.

Will be called when energysaving/DPMS gets active

◆ onDPMSDeactivated()

onDPMSDeactivated ( )

Function: onDPMSDeactivated()


onDPMSDeactivated method.

Will be called when energysaving/DPMS is turned off

◆ onScanStarted()

onScanStarted ( ...)

Function: onScanStarted(library)


onScanStarted method.

Parameters
libraryVideo / music as string
Note
Will be called when library clean has ended and return video or music to indicate which library is being scanned

v14 Python API changes
New function added.

◆ onScanFinished()

onScanFinished ( ...)

Function: onScanFinished(library)


onScanFinished method.

Parameters
libraryVideo / music as string
Note
Will be called when library clean has ended and return video or music to indicate which library has been scanned

v14 Python API changes
New function added.

◆ onCleanStarted()

onCleanStarted ( ...)

Function: onCleanStarted(library)


onCleanStarted method.

Parameters
libraryVideo / music as string
Note
Will be called when library clean has ended and return video or music to indicate which library has been cleaned

v14 Python API changes
New function added.

◆ onCleanFinished()

onCleanFinished ( ...)

Function: onCleanFinished(library)


onCleanFinished method.

Parameters
libraryVideo / music as string
Note
Will be called when library clean has ended and return video or music to indicate which library has been finished

v14 Python API changes
New function added.

◆ onNotification()

onNotification ( ...)

Function: onNotification(sender, method, data)


onNotification method.

Parameters
senderSender of the notification
methodName of the notification
dataJSON-encoded data of the notification
Note
Will be called when Kodi receives or sends a notification

v13 Python API changes
New function added.

◆ waitForAbort()

waitForAbort ( ...)

Function: waitForAbort([timeout])


Wait for Abort

Block until abort is requested, or until timeout occurs. If an abort requested have already been made, return immediately.

Parameters
timeout[opt] float - timeout in seconds. Default: no timeout.
Returns
True when abort have been requested, False if a timeout is given and the operation times out.

v14 Python API changes
New function added.

Example:

..
monitor = xbmc.Monitor()
# do something
monitor.waitForAbort(10) # sleeps for 10 secs or returns early if kodi aborts
if monitor.abortRequested():
# abort was requested to Kodi (e.g. shutdown), do your cleanup logic
..

◆ abortRequested()

abortRequested ( )

Function: abortRequested()


Returns True if abort has been requested.

Returns
True if requested

v14 Python API changes
New function added.