Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPC_FORMAT and mpc ls | mpc add #35

Closed
nmeum opened this issue Oct 14, 2018 · 3 comments
Closed

MPC_FORMAT and mpc ls | mpc add #35

nmeum opened this issue Oct 14, 2018 · 3 comments

Comments

@nmeum
Copy link
Contributor

nmeum commented Oct 14, 2018

I would like to change the format used by mpc to also include the '%position%' format specifier when performing mpc playlist in order to be able to use mpc play <position>. This can be achieved by setting the MPC_FORMAT environment variable to something along the lines %position%: [[[%artist% - ]&[%title%]]|[%file%]].

Unfortunately, doing so breaks the mpc ls | mpc add combination as mpc ls will also pickup this format. If MPC_FORMAT is unset a different default format seems to be used for mpc playlist and mpc ls.

I would suggest one of the following solutions:

  1. Always ignoring MPC_FORMAT in mpc ls
  2. Allowing the specification of custom format string on a per-subcommand basis (e.g. MPC_FORMAT_LS, MPC_FORMAT_PLAYLIST, MPC_FORMAT_CUR, …)
  3. Making mpc ls default to format %file% when standard out is not a tty.
@MaxKellermann
Copy link
Member

mpc ls|mpc add is not a supported use case. There is never a good reason to do that.

@nmeum
Copy link
Contributor Author

nmeum commented Oct 15, 2018

Ok I get it. mpc ls|mpc add can simply be replaced by mpc add / but what about mpc search artist foo | mpc add?

@MaxKellermann
Copy link
Member

MaxKellermann commented Oct 15, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants