Callback function for xbmc module (xbmc.Monitor) #856

Merged
merged 1 commit into from Apr 6, 2012

Projects

None yet

2 participants

Contributor
amet commented Apr 6, 2012

Something has gone wrong on #834 so here is a new one, sry about that

monitors for:

  • onSettingsChanged
  • onScreensaverDeactivated
  • onScreensaverActivated
  • onDatabaseUpdated, will return the database that has been updated (video/music)

xbmc.Monitor will monitor for ScreenSaver activation/deactivation, Settings changing and database update.

settings changing are quite useful on service addons to allow users to change the settings without deactivating/Activating addon to reload them. only changed addon will get notified.

cptspiff has gone over it but looks like the comments have been lost as I have squashed it down.

as ususal, this is a c/p monster from xbmc.Player callback , if anything needs changing I am all ears

Cheers,
amet

class MyMonitor( xbmc.Monitor ):
    def __init__( self, *args, **kwargs ):
        xbmc.Monitor.__init__( self )

    def onSettingsChanged( self ):
        print "settings changed, fetch new settings" 

    def onScreensaverDeactivated( self ):
        print "screensaver Deactivated" 

    def onScreensaverActivated( self ):    
        print "screensaver Activated"

    def onDatabaseUpdated( self, database ):
        print "%s database updated" %  database  

monitor = MyMonitor()
@amet amet Callback function for xbmc module (xbmc.Monitor)
monitors for:
- onSettingsChanged
- onScreensaverDeactivated
- onScreensaverActivated
- onDatabaseUpdated, will return the database that has been updated (video/music)
0ef8e70
@amet amet merged commit dd793a9 into xbmc:master Apr 6, 2012
Member

Hey @amet, we need to talk about these. Please ping me when you have a few minutes (hours :-) )

@tru tru added a commit to plexinc/plex-home-theater-public that referenced this pull request Nov 21, 2013
@tru tru Add dialog to confirm file deletion.
Fixes #856
1c2b631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment