The CLI command function for the `beet edit` command.
(self, lib, opts, args)
| 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.""" |
nothing calls this directly
no test coverage detected