SHUFFLE cmd returns 'ACK not playing'

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
StreamingMeeMee
Posts: 22
Joined: March 23rd, 2015, 8:43 pm

SHUFFLE cmd returns 'ACK not playing'

Post by StreamingMeeMee »

Running MPD v21.4 on Ubuntu 19.04. I'm interacting with MPD via Audio::MPD Perl module (https://metacpan.org/pod/Audio::MPD)

After loading a playlist, but before issuing a PLAY cmd I send SHUFFLE to randomize the list. I'm receiving "ACK [55@0] {} Not Playing" response.

The odd bit is that it does not seem to do this while telneting to the command port; it returns an expected 'OK' response.

Two questions:

- Is issuing a SHUFFLE when STOP'd an error condition, or, am I misreading the order of my commands?

- If it is an error, Is this relatively new behavior? This section of my code has not changed in quite some time; the error first emerged when running v21.4. I don't recall off-hand the prior version of MPD in use.

Thanks in advance.

T.

StreamingMeeMee
Posts: 22
Joined: March 23rd, 2015, 8:43 pm

Re: SHUFFLE cmd returns 'ACK not playing'

Post by StreamingMeeMee »

Hmm... I was premature... under some circumstances my code will issue a NEXT, which if STOP'd would reasonably return 'not playing'.

However, my question re: this being new behavior stands -- is it new(ish)?

T.

max
Forum team
Posts: 964
Joined: January 15th, 2013, 3:43 pm

Re: SHUFFLE cmd returns 'ACK not playing'

Post by max »

StreamingMeeMee wrote:
December 6th, 2019, 7:51 pm
However, my question re: this being new behavior stands -- is it new(ish)?
What is new behavior?

StreamingMeeMee
Posts: 22
Joined: March 23rd, 2015, 8:43 pm

Re: SHUFFLE cmd returns 'ACK not playing'

Post by StreamingMeeMee »

Yes, I see that was unclear.

Is returning an error when issuing a NEXT command while in a non-playing state new(ish) behavior?

The reason for the question is that my code where I encountered this has been running with a previous MPD version (~19.x?) for quite some time (years). If this is NOT new(ish) behavior I have something more going on.

Thanks.

max
Forum team
Posts: 964
Joined: January 15th, 2013, 3:43 pm

Re: SHUFFLE cmd returns 'ACK not playing'

Post by max »

StreamingMeeMee wrote:
December 7th, 2019, 3:54 pm
Is returning an error when issuing a NEXT command while in a non-playing state new(ish) behavior?
I don't know. Does it matter if that has changed?
What would you expect MPD to do when you issue a command affecting current playback when there is no playback?
Maybe some older MPD versions had no check for this condition, and maybe this check was added eventually. If you really care about this implementation detail, check the git history. But I don't care enough to look it up - I believe the current behavior is correct, and that's all that counts for me.

StreamingMeeMee
Posts: 22
Joined: March 23rd, 2015, 8:43 pm

Re: SHUFFLE cmd returns 'ACK not playing'

Post by StreamingMeeMee »

It only matters to the extent of my own curiosity and, a desire to build systems that are robust to unexpected inputs and don't themselves act in 'surprising' ways. As I said previously my code worked fine for years with prior version of MPD. In recent days I've updated MPD and made some changes to my code. I was simply trying to eliminate variables in the search for 'surprising' behavior in my code. If MPD behavior had changed, then I have found the source; if it had not then I had to look at my code.

Let me be clear; I was in no way implying that MPD acted wrongly. As I've said earlier in the thread, the 'not playing' response to a NEXT command is entirely reasonable. My task now is to review my code for other instances where the results of MPD interactions are handled correctly for OK and error responses.

I appreciate you taking the time to respond to my questions, Thank you.

Post Reply