Bug 8658 - Playlist is loaded multiple times
: Playlist is loaded multiple times
Status: RESOLVED WORKSFORME
Product: SB Controller
Classification: Unclassified
Component: Browser
: unspecified
: PC Windows XP
: -- normal (vote)
: 7.3
Assigned To: Richard Titmuss
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-07 01:34 UTC by Richard Titmuss
Modified: 2008-11-17 05:58 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Titmuss 2008-07-07 01:34:42 UTC
The playlist is loaded multiple times on Jive, when first connecting to a player and whenever the playlist changes.

The problem is that _requestStatus() is called in notify_playerCurrent, notify_playerPlaylistChange and notify_playerTrackChange. When all three callbacks get called (for example when changing players), then they all start loading chunk 0-200, etc.

Some protection is needed in Jive to prevent the playlist being loaded multiple times. Two possible solutions are 1) to flag a chunk as loading in DB.lua, and therefore cancel subsequent requests 2) to have a flag in SlimBrowser that the playlist is loading, and not start a subsequent request.

Some thought needs to be given in case the playlist changes while loading, etc.

I am not sure the the _requestStatus() is needed in notify_playerTrackChange. Ben can you comment. If it is not that a partial fix for 7.1 would be to remove this call. This would fix the problem in the most common case, when the playlist changes.
Comment 1 Ben Klaas 2008-07-07 10:45:49 UTC
I can't think of any reason that _requestStatus() is needed in SlimBrowser's playlistTrackChange notification method. I removed it and tested a variety of playlist modifications and did not see any problem.

partial fix added in 7.1 r2670.
Comment 2 Ben Klaas 2008-07-25 07:21:23 UTC
worst part of this is already addressed. address the rest in 7.3
Comment 3 Ben Klaas 2008-11-13 14:25:24 UTC
IMO, this does not need fixing.

_requestStatus() in SlimBrowser only fills in missing gaps. If there are no gaps in the list, it doesn't request another chunk. When I change players I don't see any repeated requests being generated.

When the player comes on stage it needs to generate the playlist window so a _requestStatus() is warranted there.
When the playlist changes it should request the playerstatus list again so it can update the playlist window. Again, a warranted call of _requestStatus().

assign to Richard for comment and hopefully to close.
Comment 4 Richard Titmuss 2008-11-17 05:58:41 UTC
Ok, I've retested this and mostly it works for me. The playlist is still loaded twice when the application starts, but not when switching players. I don't think we should worry about this right now.