def command(self, lib, opts, args): # Get items from arguments items = lib.items(ui.decargs(args)) self.verbose = opts.verbose def check_and_print(item): for error_line in self.check_item(item): ui.print_(error_line) par_map(check_and_print, items)
def _get_info(self, items, write, force): self.absubmit, self.acousticbrainz = None, None for plugin in find_plugins(): if plugin.name == 'absubmit': self.absubmit = plugin elif plugin.name == 'acousticbrainz': self.acousticbrainz = plugin if not self.absubmit or not self.acousticbrainz: raise ui.UserError( 'absubmit and acousticbrainz are required for this plugin') def func(item): return self.analyze(item, write, force) util.par_map(func, self.included_items(items, force))
def auto_convert(self, config, task): if self.config['auto']: par_map(lambda item: self.convert_on_import(config.lib, item), task.imported_items())
def command(self, lib, opts, args): # Get items from arguments items = lib.items(ui.decargs(args)) util.par_map(self.analyze_submit, items)
def command(self, lib, opts, args): # Get items from arguments items = lib.items(ui.decargs(args)) self.verbose = opts.verbose par_map(self.check_item, items)