MusicPlayerDaemon / mpc

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

Single oneshot support #73

Closed liate7 closed 2 years ago

liate7 commented 2 years ago

This pull request implements #71 , allowing mpc to read and set single oneshot status.

liate7 commented 2 years ago

Are there any changes I need to make?

liate7 commented 2 years ago

I've been using this version for a few days now and nothing's broken that I've noticed. It works much better than my previous solution of netcating the mpd server, at the very least.

liate7 commented 2 years ago

I've continued using this with no issues. Is there anything else I need to do to get this merged?

MaxKellermann commented 2 years ago

Doesn't compile:

../../src/command.c: In function 'cmd_single':
../../src/command.c:983:7: error: variable 'mode' has initializer but incomplete type
  enum mpd_single_state mode = MPD_SINGLE_UNKNOWN;
       ^~~~~~~~~~~~~~~~
liate7 commented 2 years ago

Sorry for not noting the continued support for very old versions of libmpdclient. I ifdefed the parts using single oneshot to only compile with libmpdclient >= 2.18 (where support for it was added), in analogy to similar treatment of groups; now it compiles with both libmpdclient version 2.9 and version 2.19. (I also fixed a mistake I'd made when changing status_format.c.) I don't know how I'd do similar for the documentation, and it doesn't look like it was done for groups. Any other changes