ext/backends: Add extensions to sub commands run

This commit is contained in:
Thomas Adamcik 2013-11-08 23:18:26 +01:00
parent ef10c2e178
commit 2581062ae0
2 changed files with 5 additions and 2 deletions

View File

@ -97,7 +97,9 @@ def main():
parser.error('Can not run sub-command %s from the disabled '
'extension %s.' % (cmd.name, extension.ext_name))
sys.exit(cmd.run(args, proxied_config))
logging.info('Running %s command provided by %s.', cmd.name,
extension.ext_name)
sys.exit(cmd.run(args, proxied_config, enabled_extensions))
if args.command == 'run':
ext.register_gstreamer_elements(enabled_extensions)

View File

@ -300,13 +300,14 @@ class BaseSubCommandProvider(object):
def __init__(self, parser):
pass
def run(self, args, config):
def run(self, args, config, extensions):
"""Run the sub-command implemented by this provider.
*MUST be implemented by subclass.*
:param args: the argments object from argpase.
:param config: read only version of the mopidy config.
:param extensions: list of enabled extensions.
:returns: integer exit value for the process.
"""
raise NotImplementedError