LMS-Community / slimserver

Server for Squeezebox and compatible players. This server is also called Lyrion Music Server.
https://lyrion.org
Other
1.2k stars 297 forks source link

Vanishing client playlists: Improve handling of client playlists for synchronized players #836

Open rsplaul opened 1 year ago

rsplaul commented 1 year ago

I keep loosing the current client playlist of synchronized player groups when I restart the server. Instead an old or empty playlist is applied to the player group.

A few tests – although I didn’t check the actual code – indicate, that this has to do with the handling of playlists when players are synchronized:

When players B and C are synchronized to player A, the original clientplaylist_<mac_of_player_B>.m3u and clientplaylist_<mac_of_player_C>.m3u files in the prefs folder are retained for whatever reason. After a server restart it can happen, that any of those two files (and not clientplaylist_<mac_of_player_A>.m3u) is used as the playlist for the player group. I suppose it depends on the order, in which the players are recognized by the server – so it gets even worse, when a bigger number of players is synchronized to a player group.

My suggestion would be to overwrite the clientplaylist_<mac_of_player>.m3u files at the time, the respective player is synchronized to another player. There is no reason to retain the old playlist, since there is no way to restore it anyways.

mikeysas commented 1 year ago

I have been witnessing this same issue inconsistently for quite a while and never understood why it was happening. Your explanation and suggestion makes a lot of sense. I regularly keep 5 or 6 players sync'd around the house. It would be great to see this addressed if possible. Thanks!

michaelherger commented 1 year ago

Are you using the Group Player plugin? Would that overcome the issue?

mikeysas commented 1 year ago

No, I have never tried that plugin. I have just been using the standard synchronize players functionary via the nice UI provided in iPeng. It makes it so easy to manage that I never thought to look elsewhere. I will give that a try and let you know.

mikeysas commented 1 year ago

Thanks for the pointer Michael! On a quick test, as I assume you expected, it appears to overcome the issue. I need to play around with it more when I have time. It is a different paradigm for managing synchronization, but I see the added potential that it creates also.