Rework Plugin.commands() to include _setup_commands().
[hooke.git] / hooke / plugin / note.py
index 168cbd34f050cbd01e6176b1faa666a15e6a6022..722b20812b22015d174ec6026025d9f9e555968a 100644 (file)
@@ -30,14 +30,9 @@ from ..plugin.playlist import current_playlist_callback
 class NotePlugin (Builtin):
     def __init__(self):
         super(NotePlugin, self).__init__(name='note')
-
-    def commands(self):
-        return [AddNoteCommand(), ClearNoteCommand(), GetNoteCommand()]
-
-    def dependencies(self):
-        return [
-            'playlist', # for current_playlist_callback
-            ]
+        self._commands = [
+            AddNoteCommand(), ClearNoteCommand(), GetNoteCommand()]
+        self._setup_commands()
 
 
 class AddNoteCommand (Command):