MusicPlayerDaemon / mpc

Command-line client for MPD
GNU General Public License v2.0
191 stars 36 forks source link

Allow for custom status format strings #69

Closed BioBox closed 3 years ago

BioBox commented 3 years ago

When I run mpc to get a status update of what's going on, it bothers me that the third line is (usually) so much longer than the others, so I wanted the ability to specify my own format string. What's nice is that I can reuse the formatting code made for -f so it was very easy to do.

The last three commits were just for weeding out warnings that only my package manager was giving me. I should have looked at the PKGBLD to see what additional compiler warnings were enabled. Sorry about that.

BioBox commented 3 years ago

There are two points that I'd like to make:

  1. "It adds a lot of complexity" No it doesn't. This doesn't make the code any more complex than it already is. I'm simply taking the code base for expressing the song format and expanding that to other things that are useful for the end user to have.

  2. If you expect the users to get information on these sorts of things through an external script, then why go through the effort of making a format option for showing the metadata on songs in the first place? Yeah it's easy to do that in Python as well, so by that logic you would scrap my code and the entirety of format.c, removing that option. In my opinion a client should be able to do basic things like that though.

I'm going to rebase my local repo for a cleaner history, fix the problems you pointed out, and resubmit the pull request. I welcome any additional feedback from you until then.