MCPcopy Index your code
hub / github.com/beetbox/beets / _get_fields

Method _get_fields

beetsplug/edit.py:191–206  ·  view source on GitHub ↗

Get the set of fields to edit.

(self, album, extra)

Source from the content-addressed store, hash-verified

189 self.edit(opts.album, objs, fields)
190
191 def _get_fields(self, album, extra):
192 """Get the set of fields to edit."""
193 # Start with the configured base fields.
194 if album:
195 fields = self.config["albumfields"].as_str_seq()
196 else:
197 fields = self.config["itemfields"].as_str_seq()
198
199 # Add the requested extra fields.
200 if extra:
201 fields += extra
202
203 # Ensure we always have the `id` field for identification.
204 fields.append("id")
205
206 return set(fields)
207
208 def edit(self, album, objs, fields):
209 """The core editor function.

Callers 2

_edit_commandMethod · 0.95
importer_editMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected