X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fplugin.py;h=0523a75f2513e723b692dc77829d651336d77220;hb=4f3916a06726459104bfa97fe85e4bbf5b48b9ed;hp=1188d4595e2190c47d8e6fbde7823926f49d852e;hpb=78a694ddcd2a6ecc8b2b1fd3c74ee2d938707305;p=mpd-sima.git diff --git a/sima/lib/plugin.py b/sima/lib/plugin.py index 1188d45..0523a75 100644 --- a/sima/lib/plugin.py +++ b/sima/lib/plugin.py @@ -26,8 +26,8 @@ class Plugin: First non-empty line of the docstring is used as description Rest of the docstring at your convenience. - The plugin Name MUST be the same as the module (file name), case - insensitive: for instance plugin.py → Plugin + The lowercased plugin Name MUST be the same as the module (file name), + for instance Plugin → plugin.py It eases plugins discovery and simplifies the code to handle them, IMHO, it's a fair trade-off. """ @@ -58,12 +58,19 @@ class Plugin: """ conf = self.__daemon.config for sec in conf.sections(): - if sec.lower() == self.__class__.__name__.lower(): + if sec == self.__class__.__name__.lower(): self.plugin_conf = conf[sec] #if self.plugin_conf: # self.log.debug('Got config for {0}: {1}'.format(self, # self.plugin_conf)) + def start(self): + """ + Called when the daemon().run() is called and + right after the player has connected successfully. + """ + pass + def callback_player(self): """ Called on player changes, stopped, paused, skipped