Bugzilla – Bug 8658
Playlist is loaded multiple times
Last modified: 2008-11-17 05:58:41 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.
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.
worst part of this is already addressed. address the rest in 7.3
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.
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.