Bugzilla – Bug 6528
SS/SC do not use CLI for sync, preventing overriding behavior
Last modified: 2008-12-18 11:12:53 UTC
Slim/Buttons/Synchronize.pm directly calls the Slim::Player::Sync::sync and Slim::Player::Sync::unsync methods rather than using the 'sync' CLI. This prevents third party code from using addDispatch to wrap/override the behavior. Background: when syncing Player B to Player A and Player A is playing a number of local files, I would prefer that Player B default to waiting until Player A starts the next track so that the sync operation doesn't force the track to start over again at the start. If the core code used the CLI instead of direct methods, I could override the behavior and even offer options like "Waiting for next song, press Play to force restarting playlist" http://forums.slimdevices.com/showthread.php?t=40981
Created attachment 2606 [details] diff agains SC7 that implements the desired behavior This patch switches to $client->execute() so that the 'sync' events triggered by the web UI or the player UI can be trapped via the normal addDispatch() mechanism.
Thanks, patch applied as change 15872.
Andy, there's a very good chance that patch is wrong. I'm mainly using 6.5.x, and there in Slim/Buttons/Synchronize the line Slim::Player::Sync::sync($client, $selectedClient); apparently should be replaced NOT with $client->execute( ['sync', $selectedClient->id()] ); but rather with $selectedClient->execute( ['sync', $client->id()] ); I need to test more with at least 3 players connected, hopefully tomorrow.
Oh, hmm, maybe this would explain some of the weirdness I am seeing when syncing now. Please use SC7 though.
Will do. I'm pretty sure about that reversal -- it's certainly the case with 6.5.x, which I've just spent the morning working with for the plugin that needs this change. I've just fired up the latest SC7 SVN to use with real players & test my reversal theory. More info later...
Created attachment 2619 [details] fixing the "sync join" bug I've tested with 3 physical players, both web and remote control UI. I just got the symantics reversed on the CLI for joining. The attached patch makes things right. I'm very sorry for sending the previous patch without proper testing. -Peter
Thanks, applied as change 15940.
Created attachment 2637 [details] patch for Slim::Player::Sync::restoreSync() Here's one I missed. This is needed so the restoreSync() method that's called when a synced (but powered separately) player is turned on will also use the CLI. Patch tested with two players (SB3, Softsqueeze).
Thanks, applied.
This bug is being closed since it was resolved for a version which is now released! Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html If you are still seeing this bug, please re-open it and we will consider it for a future release.