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

Method _command_str

beetsplug/play.py:175–186  ·  view source on GitHub ↗

Create a command string from the config command and optional args.

(self, args=None)

Source from the content-addressed store, hash-verified

173 play(command_str, selection, paths, open_args, self._log, item_type)
174
175 def _command_str(self, args=None):
176 """Create a command string from the config command and optional args."""
177 command_str = config["play"]["command"].get()
178 if not command_str:
179 return util.open_anything()
180 # Add optional arguments to the player command.
181 if args:
182 if ARGS_MARKER in command_str:
183 return command_str.replace(ARGS_MARKER, args)
184 return f"{command_str} {args}"
185 # Don't include the marker in the command.
186 return command_str.replace(f" {ARGS_MARKER}", "")
187
188 def _playlist_or_paths(self, paths):
189 """Return either the raw paths of items or a playlist of the items."""

Callers 2

_play_commandMethod · 0.95
importer_playMethod · 0.95

Calls 2

replaceMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected