Bug 3404 - Playlist pane not updated when player is changed
: Playlist pane not updated when player is changed
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.5b1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-10 23:40 UTC by Jim McAtee
Modified: 2008-09-15 14:38 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim McAtee 2006-05-10 23:40:04 UTC
In the Default skin the playlist pane doesn't get updated to the playlist for newly selected player.  It gets refreshed, but with the playlist for the previously selected player.  I can also see the wrong MAC address in the playlist's control URLs.

It's just a little inconsistent in it's behavior.  Not sure if this helps, but I have two SB2s and a software player defined at the moment.  When I select the software player the playlist always gets updated correctly, but when I switch from one of the hardware players to the other it's never updated correctly.

This is at r7386 running the Perl code on XP Pro and is seen in both Firefox and IE.
Comment 1 KDF 2006-05-11 08:55:38 UTC
probably the new cookie-based control?  I've used cookies with Fishbone skin for some time, and it's been a bumpy road.
Comment 2 Andy Grundman 2006-05-11 09:06:08 UTC
Hmm at first I was going to say I can't reproduce, but then it did happen to me.  I think there is a race condition between the time the cookie is set and the time the playlist frame is reloaded.  I will look into it.
Comment 3 Jim McAtee 2006-05-11 09:10:19 UTC
(In reply to comment #1)
> probably the new cookie-based control?  I've used cookies with Fishbone skin
> for some time, and it's been a bumpy road.

No, this was happening before the new cookie based control.  Which isn't working either.  I was going to post another bug report on that issue but hadn't gathered from the checkin whether it was actually supposed to be working or if the code checked in was just in preparation for some future change.

New observation: I think it may only happen when the playlist of the newly selected player is empty.  If both playlists are non-empty then they switch as expected.
Comment 4 Andy Grundman 2006-05-11 09:13:58 UTC
I can reproduce with both playlists populated.  As you said it's not related to the cookie because all the refreshes use the player query param anyway.  The cookie only comes into play when you do a full refresh or open a new browser.
Comment 5 Jim McAtee 2006-05-11 09:19:14 UTC
Just to be sure I rolled back to r7382, before the cookie code was added to the trunk (r7383).  Same behavior.
Comment 6 KDF 2006-05-11 09:38:28 UTC
have a look at the doLoad function from common.js then.  might also be useful to watch newPlayer var in switchPlayer.

However, that script is very similar to the code used in the Fishbone skin...and I haven't noticed a bad player frame refresh with that for a some time.  I could be possible that I overlooked something I needed to merge from one of those fixes in that back into default.

Comment 7 Andy Grundman 2006-05-11 09:40:55 UTC
I think I've tracked it down to the Safari code in doLoad().  When status_header.html refreshes, it reloads the playlist frame *using the old URL*.  Either the Safari code needs to be changed to rewrite the player param, or the refresh function needs to refresh the playlist first, then the status_header.
Comment 8 KDF 2006-05-11 09:42:53 UTC
hmm... Fishbone version of the doLoad function is in ajax.js, called refreshPlaylist.  I had to add a var for the new player, and replace that in the url as well in order to make it work reliably.  That might be one way to go.
Comment 9 Andy Grundman 2006-05-11 09:44:19 UTC
And the race condition comes into play when switchPlayer changes the playlist location, but if the doLoad code fires before the playlist has finished reloading, I think that's when you get the wrong playlist reloaded.
Comment 10 Andy Grundman 2006-05-11 10:09:57 UTC
Checked in a possible fix.  Can you see if it helps?
Comment 11 Jim McAtee 2006-05-11 10:51:42 UTC
Yep, so far it looks good.  I'll do some more testing.
Comment 12 Andy Grundman 2006-05-12 14:02:59 UTC
I assume we can close this bug?  I'll merge back to 6.3 if you guys think it looks good.
Comment 13 KDF 2006-05-12 14:36:50 UTC
I'll leave this as Jim's call.  The patch looks good, but I've been unable to test with multiple players.
Comment 14 Jim McAtee 2006-05-12 14:39:02 UTC
Definitely working well for me.  I have four players now - two hardware and two software - and switching between any of them, empty playlist or populated, is working without a hitch.
Comment 15 Andy Grundman 2006-05-12 14:39:31 UTC
Great, marking as fixed.
Comment 16 Chris Owens 2006-06-27 14:21:36 UTC
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.