how to use the idle command

Cool stuff you can do with MPD. A place for you to put your hacks and patches, or be inspired by others'.
Post Reply
ngdev38
Posts: 1
Joined: July 3rd, 2015, 9:49 am

how to use the idle command

Post by ngdev38 » July 3rd, 2015, 10:05 am

Hello All,

I am trying to figure out how to use the idle command. Specifically, I would like to figure out if a song normally finished its time and switched to the next song or if a user pressed Next/Prev in one of the clients.

In bash, I do
mpc idle

Then when I play, pause, next, prev using mpc all I get is the response "player" from the idle command.

Is this the expected behavior? I would have expected the events to include some finer resolution like player-next, player-pause, etc.

I would appreciate your feedback.

Thanks,
Ng

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

Re: how to use the idle command

Post by max » July 3rd, 2015, 3:24 pm

When you receive the idle event "player" you know that the player status has changed - and it's up to you to check what exactly has changed.

Post Reply