MCPcopy
hub / github.com/beetbox/beets / _edit_command

Method _edit_command

beetsplug/edit.py:175–189  ·  view source on GitHub ↗

The CLI command function for the `beet edit` command.

(self, lib, opts, args)

Source from the content-addressed store, hash-verified

173 return [edit_command]
174
175 def _edit_command(self, lib, opts, args):
176 """The CLI command function for the `beet edit` command."""
177 # Get the objects to edit.
178 items, albums = do_query(lib, args, opts.album, False)
179 objs = albums if opts.album else items
180 if not objs:
181 ui.print_("Nothing to edit.")
182 return
183
184 # Get the fields to edit.
185 if opts.all:
186 fields = None
187 else:
188 fields = self._get_fields(opts.album, opts.field)
189 self.edit(opts.album, objs, fields)
190
191 def _get_fields(self, album, extra):
192 """Get the set of fields to edit."""

Callers

nothing calls this directly

Calls 3

_get_fieldsMethod · 0.95
editMethod · 0.95
do_queryFunction · 0.90

Tested by

no test coverage detected