Bugzilla – Bug 5621
Default skin player chooser resets on server restart
Last modified: 2009-09-08 09:15:24 UTC
The Javascript for updating current player will reset to blank when the server is gone. This ends up causing the wrong wrong player to be used after a server restart. This doesn't seem to affect the current playlist, but it does affect the browse and now playing sections. Michael has not yet been able to duplicate, but I'm getting it all of the time. I'm gooiing to leave this here as placeholder in case I do find a fix.
the cause is the following lines: PlyerChooser.selectPlayer({ text: '', value: '' }); This causes the cookie to be set to '', thus when the server starts up, it will default back to the first player in the list. It makes sense to be able to react to a player that goes away, but we probably need a way to also have the "preferred player" kept around. Maybe a dual cookie system "last-select" and "current player", with teh preference for teh "last-selected". I also have another idea for the player cookie which I'll post as a new enahancement.
Created attachment 2357 [details] patch I've been using This is probably not the correct solution, as you may want to have some mechanism for dealing with players that have really gone away. I've been using this patch becuase I don't add/remove players so I can count on a given player being in the list within a few seconds. Both cases cause problems as they can be executed before all players have initialised. I still think a more thorough solution would be one that bypassed the cookie player if it's not in the list, but only writing a new value to the cookie when a player is manually chosen. Unfortunately, it hasn't been something I've had much time to work on.
change 14477 - trying to keep the current player until the user selects a new one. This should help with conditions where the server is coming back but doesn't know all player's yet.
Kevin - can you still reproduce this issue?
On restart, the chooser goes blank, which matches what you described in the checkin. However, it doesn't seem to recover when the player is back. refreshing the window correct gets the previously chosen player, so that's the main thing. Ideally, then the jsonrpc.js returns start up again, the chooser should recover if the player cookie is in the list.
Change 14701 is another try to sort this out...
seems to be working fine now.
We're seeing side-effects of this change which lead to continued loading of the browse frame: Dean: shut down SC and switch from eg. to trunk, while a browser window is still open Michael: open SC web interface, disconnect currently selected player, restart SC Interestingly the issue doesn't occur in FF, as it doesn't call the failure handler but just passes an empty answer to the success handler when querying the player status fails. Other browsers like eg. Safari will loop quickly.
Change 15641 clears the global playerid variable, but tries to keep track of the last used player. If it comes back it will automatically be selected again. Could you please test this with your cases of looping Safari (Dean) and wrongly connected players (Kevin)? Thanks!
seems ok for keeping the player across restart, at least for me.
Thanks for the feedback. Everybody feel free to re-open if needed.
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.