ext/backends: Add extensions to sub commands run
This commit is contained in:
parent
ef10c2e178
commit
2581062ae0
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user