sync of position inside playlists

Cool stuff you can do with MPD. A place for you to put your hacks and patches, or be inspired by others'.
Post Reply
Posts: 1
Joined: October 3rd, 2019, 6:31 pm

sync of position inside playlists

Post by jukebox_robs »

I new in this forum, so hello to everyone. I use mpd and mpc for now over a year "to make my children happy", and happy children make happy parents :) . But there is still one missing maybe possible enhancement for my system, so maybe somebody could help me.

I set up some "juke-boxes" for children (a loundspeaker with integrated raspberry pi zero w, amplifier and rfid-reader for selecting and starting the playlist). Each speaker runs locally a mpd daemon and is controlled via rfid-cards and local mpc. But all jukeboxes are "visible" in the same wifi. The playlists are similar on each jukebox (synced with rsync).
My children love radio plays ("Hörspiele" in german), this means a limited number of large mp3-file (up to 90 minutes) in each playlist. And sometimes they like to stop the playback at one jukebox and continue on a different jukebox (or maybe duplicate the playback like "multiroom"). Is there a way to get the actual playlist from mpc and the position inside the playlist (song Nr. and played time inside this song) and can this output "reimported" by mpc (on a different device)? To get the actual playlist should not be the big issue, but maybe the position inside and how to jump to this position.

The position inside the playlist could be extracted manually by
mpc status
and some sed and grep. But how to "jump" to this position again?

I don't need a perfect synchronisation, but -+10 seconds would be nice.

Any Hints?

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

Re: sync of position inside playlists

Post by max »

It would be possible to write a simple client which copies one instance's state to another instance. But I don't know if such a thing exists. Maybe this would be a useful feature for "mpc".
Post Reply