Now playing screen/ queue get´s out of sync when controlled using mpd

Volumio Version: 3.179
Hardware: RPi 3B
DAC: Hifiberry Digi Pro+

When working I control Volumio (Play/Pause, Next) over MPD (XFCE4 Panel Plugin). When I press Pause Volumio pauses the music as expected and continues at the same position when pressing play.
BUT in the Volumio now playing screen (NOT the plugin!) or the queue you can still see the progress of the song continuing. When it reaches the end of the song the now playing screen and queue displays the next song, while still the last song gets played after pressing play again. This can happen multiple times (when you pause for a long time), so it is out of sync to the currently played song.

Bug is reproducible with different MPD clients (XFCE panel plugin, Sonata, MPDroid on Android Tablet).
Not really serious, but annoying on the long run.

Greetings,
Stefan

Hi Stefan, the Now Playing screen updates itself based on state info broadcasted by Volumio, which happens when a Play / Pause / Next etc. occurs. Does Volumio’s own UI (i.e. http://<volumio_address> in the web browser) show the same behaviour?

It’s also in the native volumio GUI. Also when pressing repeatly on forward/ back buttons.

Yes, I was reffering to the native Volumio UI play screen, as in the screenshot below. I did not mean the now playing plugin! Sorry for confusion caused by my wording.

Can you reproduce it ?

But still you need to solve it :slight_smile:

yep, even in Volumio’s own GUI.
Just move the slider a couple of times back and forward. It will stall for a moment and you have an offset for free. It will be corrected with the next song. It’s not a biggy, just a bit annoying.

As far as I can see/tell, it misses a status update or something like that.

And don’t do it too much, as everything will crash …

For me it does not get corrected. When the “virtual position” in the UI reaches the end of a song then it moves forward to the next song in the queue, while still playing the previous one after pressing play again…then displayed and played song are different. When you pause for a longer time it can affect multiple songs…

Interestingly the MPD client always shows the correct one.

Here a screenshot with Volumio UI and MPD-Client (Sonata). The MPD client still shows the song that is really played, Volumio already moved forward to the next one.

After a song finishes also the Volumio UI moves to the next one, always staying ahead of the really played song.

What do you see if you open a console session and enter the command:
volumio status

I’ve reported this during the beta testing, but can’t duplicate this V3.179. Volumio moving to the next track while the previous is still playing.

volumio status

gives the song according to Volumio UI.

MAybe the folks from Volumio have a suggestion. I can do this:

And when I start playing the song ends after 30 seconds, moves to the next track and everything is OK again.

I think Volumio is meant to be controlled via a Volumio client. Sonata, MPDroid et al. are MPD clients and while you can control the MPD instance on Volumio, you are actually bypassing Volumio’s client interface. So with a Volumio client (such as Volumio UI), when you play something in the Music Library, the following happens:

  1. Volumio client sends ‘play’ command to Volumio server.
  2. Volumio server tells the MPD plugin to play track / album.
  3. MPD plugin then sends the ‘play’ command to the MPD instance running on Volumio
  4. MPD instance plays song and emits a ‘played’ event
  5. MPD plugin captures the event and passes it to Volumio server, which then broadcasts the relevant state info to clients

When you control playback directly through an MPD client, you have skipped steps 1 and 2. This has implications because, somewhere between steps 2 and 3, the MPD plugin gets tagged as the current player service. When the MPD plugin receives an event from the MPD instance, it checks whether it is the currently tagged player service. If it is not, then the event won’t be processed in step 5 and you won’t see the updated state in the Volumio client.

(PS. this is based on my understanding of how Volumio works…)

1 Like

I did some more testing: it happens only at files from my local (NAS) music library. When playing from Oobuz everything behaves as expected.

Sounds plausible to me and makes sense.

But still think this should be fixed, Volumio should control and incorporate the MPD state. UI and MPD server should be in sync.

That also gives great usability, for example I can control Volumio using keyboard shortcuts under Linux, everything is already there for MPD. That functionality should be kept!