Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Kodi's monitor class. More...

Classes

class  XBMCAddon::xbmc::Monitor
 

Functions

 XBMCAddon::xbmc::Monitor::onSettingsChanged ()
 

Function: onSettingsChanged()


onSettingsChanged method.
 
 XBMCAddon::xbmc::Monitor::onScreensaverActivated ()
 

Function: onScreensaverActivated()


onScreensaverActivated method.
 
 XBMCAddon::xbmc::Monitor::onScreensaverDeactivated ()
 

Function: onScreensaverDeactivated()


onScreensaverDeactivated method.
 
 XBMCAddon::xbmc::Monitor::onDPMSActivated ()
 

Function: onDPMSActivated()


onDPMSActivated method.
 
 XBMCAddon::xbmc::Monitor::onDPMSDeactivated ()
 

Function: onDPMSDeactivated()


onDPMSDeactivated method.
 
 XBMCAddon::xbmc::Monitor::onScanStarted (...)
 

Function: onScanStarted(library)


onScanStarted method.
 
 XBMCAddon::xbmc::Monitor::onScanFinished (...)
 

Function: onScanFinished(library)


onScanFinished method.
 
 XBMCAddon::xbmc::Monitor::onCleanStarted (...)
 

Function: onCleanStarted(library)


onCleanStarted method.
 
 XBMCAddon::xbmc::Monitor::onCleanFinished (...)
 

Function: onCleanFinished(library)


onCleanFinished method.
 
 XBMCAddon::xbmc::Monitor::onNotification (...)
 

Function: onNotification(sender, method, data)


onNotification method.
 
 XBMCAddon::xbmc::Monitor::waitForAbort (...)
 

Function: waitForAbort([timeout])


Wait for Abort
 
 XBMCAddon::xbmc::Monitor::abortRequested ()
 

Function: abortRequested()


Returns True if abort has been requested.
 

Detailed Description

Kodi's monitor class.

Class: xbmc.Monitor()

Creates a new monitor to notify addon about changes.

Function Documentation

◆ abortRequested()

bool XBMCAddon::xbmc::Monitor::abortRequested ( )

Function: abortRequested()


Returns True if abort has been requested.

Returns
True if requested

v14 Python API changes
New function added.

◆ onCleanFinished()

XBMCAddon::xbmc::Monitor::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.

◆ onCleanStarted()

XBMCAddon::xbmc::Monitor::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.

◆ onDPMSActivated()

XBMCAddon::xbmc::Monitor::onDPMSActivated ( )

Function: onDPMSActivated()


onDPMSActivated method.

Will be called when energysaving/DPMS gets active

◆ onDPMSDeactivated()

XBMCAddon::xbmc::Monitor::onDPMSDeactivated ( )

Function: onDPMSDeactivated()


onDPMSDeactivated method.

Will be called when energysaving/DPMS is turned off

◆ onNotification()

XBMCAddon::xbmc::Monitor::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.

◆ onScanFinished()

XBMCAddon::xbmc::Monitor::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.

◆ onScanStarted()

XBMCAddon::xbmc::Monitor::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.

◆ onScreensaverActivated()

XBMCAddon::xbmc::Monitor::onScreensaverActivated ( )

Function: onScreensaverActivated()


onScreensaverActivated method.

Will be called when screensaver kicks in

◆ onScreensaverDeactivated()

XBMCAddon::xbmc::Monitor::onScreensaverDeactivated ( )

Function: onScreensaverDeactivated()


onScreensaverDeactivated method.

Will be called when screensaver goes off

◆ onSettingsChanged()

XBMCAddon::xbmc::Monitor::onSettingsChanged ( )

Function: onSettingsChanged()


onSettingsChanged method.

Will be called when addon settings are changed

◆ waitForAbort()

bool XBMCAddon::xbmc::Monitor::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
..