Bugzilla – Bug 9767
Syncing while playing Rhapsody doesn't work right
Last modified: 2009-07-31 10:31:00 UTC
1. Start 1 player playing Rhapsody. 2. Sync it to another player. 3. They try to restart the track but the setup data (rpds 8) isn't properly sent to the new player so it fails. I think some states are being missed here.
Andy, I've looked at this and can see a few issues. The plugin does not hand error FE (254) which means need session. Is this different from need new session - that is, is it always safe just to send the current session in response to this error or will it sometimes mean that the existing session has expired? The same session is shared for all players in a sync-group. Does this work even when not all players in the sync-group are using the same account? As you mentioned in email, we are currently getting a new session for each track. As I understand it, that is wrong. Maybe a StreamingController needs to support pluginData, and we should store the session info there. Anyway, I can see the cause of the specific problem: the session is only sent to the player when the next track info is got. This does not happen when a track is restarted (for example, by a player joining a sync-group). We probably need to add an onStream method, unless a strategy of lazily sending the session when we get a 254 error will work.
I don't think error 254 will work here, the problem is the player has global variables for session ID, track ID, etc, and if the player ever played Rhapsody before it was added to the sync group, it will think it has a 'valid' session but will still fail to play because the other information (track ID) is out of date. The rpds 8 packet should be the same for all players in a sync group, they should all use the same account and session ID. And it should be sent before every track. Also, the reason it has to get a new session on each track is because there's no way to detect 'stop' to clear a cached session. There may be a way around this on the SN side, but I had some issues with Rhapsody returning proper error messages when a session has become invalid.
Fixed in change 23764
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC