Bugzilla – Bug 16634
Albums with tracks > 200
Last modified: 2011-06-03 03:37:00 UTC
I just realized a problem with SB-Server / SqueezePlay (7.5.1) with albums that have more than 200 tracks (can happen for some Audio-Books). When you go down the route of MyMusic->Albums->Tracks, the tracks are loaded in batches of 200. Unfortunately the track indices start at 0 for each batch. So if one selects track #205, SqueezePlay will issue a command to play track #5. According to the forum where I asked first, this is also an issue with a 7.6 controller. http://forums.slimdevices.com/showthread.php?t=82901 If one point me roughly to the place in the server code where the response is generated I'm happy to help providing a patch for this issue.
Yes, I see the same thing playing very large albums on the Touch or using desktop SqueezePlay. If I play music from the web interface on the Touch it will begin at the correct track. Also, playing single tracks from an SP context menu will play the correct track. It's when you play a track > 200 from the SqueezePlay interface and it queues up the entire album, it will begin playing at track number (n mod 200) + 1.
It's the same on Apps, I tried Napster. For some reason this works fine in iPeng so it doesn't not seem to be a server side issue. In case it's some play_index related issue: iPeng doesn't use that, it just sends the "play" command as it is and this works fine since it identifies the track by the id. So doing changes to play_index should be safe from an iPeng side, too, if that's the issue here but at the same time I think it should be fairly easy to fix on the client side. I only tried Napster for iPeng, this comment doesn't reflect the situation for playlists and albums in the local library.
This is the comet sent for the tracks menu item_loop => [ { params => { album_id => 6471, artist_id => 5321, list_index => 0, track_id => 113_548 }, style => "itemplay", text => "Track 801", window => { "icon-id" => 113_548, text => "Track 801" }, }, { params => { album_id => 6471, artist_id => 5321, list_index => 1, track_id => 113_549 }, style => "itemplay", text => "Track 802", window => { "icon-id" => 113_549, text => "Track 802" }, }, The problem here is the value of the 'list_index'. SqueezePlay sends back all params, the server looks into 'list_index' (better would be the track_id I guess) and starts song 0 or 1 even if we have Track 801 or 802 at hand. So for batched menus the list_index should either reveal the real position in the big list (i.e. 800 / 801) or the server should prefer the track_id over the list_index when it gets both. It'd be interesting if the intention of the list_index was to show the position in the current batch or in the big list. Based on that the client can go on just sending back all params - or needs to add the offset manually. I'd expect the server to send a correct offsetted list_index, when it uses this value for later processing like it seems to be done for the track menu.
Further investigation: Just omitting list_index is not possible, as the tracks menu uses the 'jiveplaytrackalbum' command. Without 'list_index' this command doesn't work. So the server indeed needs to send a correct 'list_index' based on the whole list for the tracks menu to work correctly.
Created attachment 7034 [details] add offset to list_index param sent on $menuMode requests Stefan, would you mind giving this patch a try? I think the solution is pretty simple but I don't have a >200 track album to quickly test against.
Hi Ben, yes this fixes the problem (for album tracks) - and also doesn't break SqueezePad (which has got a workaround now that looks for 'list_index'<'offset') But note that I think that the problem is everywhere where you have a 'list_index' param. Another place I found is, when you surf to MyMusic->Playlists->SomePlaylist->Tracks. There again list_index starts at 0 for every block and it depends on 'jiveplaytrackplaylist' whether it uses the list_index or track_id to start the correct track from the playlist. You don't need big albums or playlists for testing by the way. Search for '200' in SlimBrowser/SlimBrowserApplet.lua and change it to '5' Also change 'BLOCKSIZE=200' in in SlimBrowser/DB.lua to 'BLOCKSIZE=5'. Then you can simulate every bug that happens at 200+ already with every 6th menu item. Don't commit these particular changes of course ;) ...
Created attachment 7037 [details] add offset to list_index param sent for playlistQuery and titlesQuery Stefan- good catch on the playlist tracks query. I looked through the code and I think playlists and track listings are the only cases where this fix was needed. The browse music folder query already had the correct code for adding the offset to the index for list_index. Try this patch and let me know if you see any further problem.
looks good to me.
== Auto-comment from SVN commit #31538 to the slim repo by bklaas == == http://svn.slimdevices.com/slim?view=revision&revision=31538 == Fixed Bug: 16634 Description: add offset to list_index on titlesQuery and playlistTracksQuery responses
Could this change have broken something in the Now Playing screen? See forum discussion: http://forums.slimdevices.com/showthread.php?t=83353
This checkin wouldn't have affected the player status information, but my previous checkin 31537 could have. I will post to that forum thread.
This change seems to have broken playlist display on jive for any plylist which has embedded URLs. when I try to browse into my Radio stations playlists I just get an infinite spinner and the following in my logs. [10-11-24 20:07:41.4804] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-11-24 20:07:51.5738] Slim::Control::Request::execute (1926) Error: While trying to run function coderef [Slim::Control::Queries::playlistsTracksQuery]: [Can't use an undefined value as an ARRAY reference at /<C:\PROGRA~1\SQB6FD~1\server\SqueezeSvr.exe>Slim/Control/Queries.pm line 2712. ] [10-11-24 20:08:01.6630] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-11-24 20:08:06.9524] Slim::Control::Request::execute (1926) Error: While trying to run function coderef [Slim::Control::Queries::playlistsTracksQuery]: [Can't use an undefined value as an ARRAY reference at /<C:\PROGRA~1\SQB6FD~1\server\SqueezeSvr.exe>Slim/Control/Queries.pm line 2712. ] [10-11-24 20:08:12.0366] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. The playlist worked fine before I upgraded yesterday and still displays fine from the WebUI. #EXTM3U #EXTINF:-1,TodayFM Stream http://streaming.todayfm.com:8000/ #EXTINF:-1,NewsTalk106 http://newstalk.fmstreams.com:8080/listen.pls #EXTINF:-1,WFMU_32k http://wfmu.org/wfmu32.pls #EXTINF:-1,WFMU_128k http://wfmu.org/wfmu.pls #EXTINF:-1,Talksport http://www.talksport.net/mp/../talksport-liveUK_LL.asx #EXTINF:-1,BBC Radio 1 http://bbc.co.uk/radio/listen/live/r1.asx #EXTINF:-1,BBC Radio 2 http://bbc.co.uk/radio/listen/live/r2.asx #EXTINF:-1,BBC Radio 3 http://bbc.co.uk/radio/listen/live/r3.asx #EXTINF:-1,BBC Radio 4 http://bbc.co.uk/radio/listen/live/r4.asx #EXTINF:-1,BBC Radio 5 http://bbc.co.uk/radio/listen/live/r5l.asx #EXTINF:-1,BBC Radio 5 live sport http://bbc.co.uk/radio/listen/live/r5lsp.asx #EXTINF:-1,BBC Radio 6 Music http://bbc.co.uk/radio/listen/live/r6.asx
Mick, I fixed a completely unrelated problem in playlistsTracksQuery yesterday. Can you update and try again? If the SBS update doesn't fix it, what you are experiencing requires a different bug. Fixing the offset value wouldn't have broken embedded URLs. There was, however, significant work in playlistsTrackQuery a few weeks ago unrelated to this bug: http://svn.slimdevices.com/slim/7.6/trunk/server/Slim/Control/Queries.pm?r1=31534&r2=31533&pathrev=31534
Ben, Your change hasn't fixed the problem but it has changed the behaviour of the bug. Prior to you change, when I tried to browse into any playlist that contains URLs, I just got the infinite spinner of death. Now, the page to display the playlist appears, but it's empty. Strangely, if I click on a playist name (without browsing into it), the url plays. Not sure if anything in this debug info helps. [10-12-01 22:15:21.5170] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-12-01 22:15:51.7986] Slim::Web::Pages::Playlist::playlist (73) currentPlaylistChangeTime : Wed Dec 1 21:12:41 2010 [10-12-01 22:15:51.7995] Slim::Web::Pages::Playlist::playlist (74) currentPlaylistRender : Wed Dec 1 22:01:10 2010 [10-12-01 22:15:51.8004] Slim::Web::Pages::Playlist::playlist (75) currentPlaylistRenderSkin : [10-12-01 22:15:51.8012] Slim::Web::Pages::Playlist::playlist (76) currentPlaylistRenderStart: 0 [10-12-01 22:15:51.8021] Slim::Web::Pages::Playlist::playlist (78) skinOverride: [10-12-01 22:15:51.8029] Slim::Web::Pages::Playlist::playlist (79) start: 0 [10-12-01 22:15:51.8038] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-12-01 22:16:22.2471] Slim::Web::Pages::Playlist::playlist (73) currentPlaylistChangeTime : Wed Dec 1 21:12:41 2010 [10-12-01 22:16:22.2480] Slim::Web::Pages::Playlist::playlist (74) currentPlaylistRender : Wed Dec 1 22:01:10 2010 [10-12-01 22:16:22.2488] Slim::Web::Pages::Playlist::playlist (75) currentPlaylistRenderSkin : [10-12-01 22:16:22.2497] Slim::Web::Pages::Playlist::playlist (76) currentPlaylistRenderStart: 0 [10-12-01 22:16:22.2505] Slim::Web::Pages::Playlist::playlist (78) skinOverride: [10-12-01 22:16:22.2513] Slim::Web::Pages::Playlist::playlist (79) start: 0 [10-12-01 22:16:22.2522] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-12-01 22:16:52.6615] Slim::Web::Pages::Playlist::playlist (73) currentPlaylistChangeTime : Wed Dec 1 21:12:41 2010 [10-12-01 22:16:52.6624] Slim::Web::Pages::Playlist::playlist (74) currentPlaylistRender : Wed Dec 1 22:01:10 2010 [10-12-01 22:16:52.6632] Slim::Web::Pages::Playlist::playlist (75) currentPlaylistRenderSkin : [10-12-01 22:16:52.6640] Slim::Web::Pages::Playlist::playlist (76) currentPlaylistRenderStart: 0 [10-12-01 22:16:52.6648] Slim::Web::Pages::Playlist::playlist (78) skinOverride: [10-12-01 22:16:52.6656] Slim::Web::Pages::Playlist::playlist (79) start: 0 [10-12-01 22:16:52.6665] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-12-01 22:17:23.0106] Slim::Web::Pages::Playlist::playlist (73) currentPlaylistChangeTime : Wed Dec 1 21:12:41 2010 [10-12-01 22:17:23.0116] Slim::Web::Pages::Playlist::playlist (74) currentPlaylistRender : Wed Dec 1 22:01:10 2010 [10-12-01 22:17:23.0124] Slim::Web::Pages::Playlist::playlist (75) currentPlaylistRenderSkin : [10-12-01 22:17:23.0133] Slim::Web::Pages::Playlist::playlist (76) currentPlaylistRenderStart: 0 [10-12-01 22:17:23.0140] Slim::Web::Pages::Playlist::playlist (78) skinOverride: [10-12-01 22:17:23.0148] Slim::Web::Pages::Playlist::playlist (79) start: 0 [10-12-01 22:17:23.0157] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-12-01 22:17:36.9306] Slim::Control::Request::dump (2431) Request: Query [serverstatus] from /d3952445/slim/serverstatus|1| (Dispatchable) [10-12-01 22:17:36.9325] Slim::Control::Request::dump (2433) Param: [_index] = [0] [10-12-01 22:17:36.9341] Slim::Control::Request::dump (2433) Param: [subscribe] = [60] [10-12-01 22:17:36.9357] Slim::Control::Request::dump (2433) Param: [_quantity] = [50] [10-12-01 22:17:36.9457] Slim::Control::Request::registerAutoExecute (2239) New buddy: d3952445 - serverstatus - global [10-12-01 22:17:36.9510] Slim::Control::Request::dump (2431) Request: Query [firmwareupgrade] from /d3952445/slim/firmwarestatus|2| (Dispatchable) [10-12-01 22:17:36.9527] Slim::Control::Request::dump (2433) Param: [subscribe] = [0] [10-12-01 22:17:36.9543] Slim::Control::Request::dump (2433) Param: [firmwareVersion] = [7.6.0 r9243] [10-12-01 22:17:36.9560] Slim::Control::Request::dump (2433) Param: [inSetup] = [0] [10-12-01 22:17:36.9575] Slim::Control::Request::dump (2433) Param: [machine] = [jive] [10-12-01 22:17:36.9596] Slim::Control::Request::registerAutoExecute (2239) New buddy: d3952445 - firmwareupgrade - global [10-12-01 22:17:36.9644] Slim::Control::Request::dump (2431) Request: Query [00:04:20:16:01:b8->date] from /d3952445/slim/datestatus/00:04:20:16:01:b8|3| (Dispatchable) [10-12-01 22:17:36.9661] Slim::Control::Request::dump (2433) Param: [subscribe] = [3600] [10-12-01 22:17:36.9685] Slim::Control::Request::registerAutoExecute (2239) New buddy: d3952445 - date - 00:04:20:16:01:b8 [10-12-01 22:17:37.2074] Slim::Control::Request::subscribe (799) Request from: Slim::Web::Cometd::__ANON__ - (14 listeners) [10-12-01 22:17:37.2103] Slim::Control::Request::dump (2431) Request: Query [00:04:20:16:01:b8->status] from /d3952445/slim/playerstatus/00:04:20:16:01:b8|6| (Dispatchable) [10-12-01 22:17:37.2120] Slim::Control::Request::dump (2433) Param: [_index] = [-] [10-12-01 22:17:37.2136] Slim::Control::Request::dump (2433) Param: [subscribe] = [0] [10-12-01 22:17:37.2152] Slim::Control::Request::dump (2433) Param: [menu] = [menu] [10-12-01 22:17:37.2168] Slim::Control::Request::dump (2433) Param: [_quantity] = [10] [10-12-01 22:17:37.2184] Slim::Control::Request::dump (2433) Param: [useContextMenu] = [1] [10-12-01 22:17:37.6847] Slim::Control::Request::registerAutoExecute (2239) New buddy: d3952445 - status - 00:04:20:16:01:b8 [10-12-01 22:17:37.6880] Slim::Control::Request::dump (2431) Request: Query [00:04:20:16:01:b8->displaystatus] from /d3952445/slim/displaystatus/00:04:20:16:01:b8|7| (Dispatchable) [10-12-01 22:17:37.6889] Slim::Control::Request::dump (2433) Param: [subscribe] = [showbriefly] [10-12-01 22:17:37.6900] Slim::Control::Request::registerAutoExecute (2239) New buddy: d3952445 - displaystatus - 00:04:20:16:01:b8 [10-12-01 22:17:53.2596] Slim::Web::Pages::Playlist::playlist (73) currentPlaylistChangeTime : Wed Dec 1 21:12:41 2010 [10-12-01 22:17:53.2605] Slim::Web::Pages::Playlist::playlist (74) currentPlaylistRender : Wed Dec 1 22:01:10 2010 [10-12-01 22:17:53.2613] Slim::Web::Pages::Playlist::playlist (75) currentPlaylistRenderSkin : [10-12-01 22:17:53.2621] Slim::Web::Pages::Playlist::playlist (76) currentPlaylistRenderStart: 0 [10-12-01 22:17:53.2629] Slim::Web::Pages::Playlist::playlist (78) skinOverride: [10-12-01 22:17:53.2637] Slim::Web::Pages::Playlist::playlist (79) start: 0 [10-12-01 22:17:53.2646] Slim::Web::Pages::Playlist::playlist (96) Returning cached playlist html - not modified. [10-12-01 22:17:55.5846] Slim::Control::Request::dump (2431) Request: Query [00:04:20:16:01:b8->playlists] from /d3952445/slim/request|39| (Dispatchable) [10-12-01 22:17:55.5863] Slim::Control::Request::dump (2433) Param: [_index] = [0] [10-12-01 22:17:55.5879] Slim::Control::Request::dump (2433) Param: [menu] = [track] [10-12-01 22:17:55.5896] Slim::Control::Request::dump (2433) Param: [_quantity] = [200] [10-12-01 22:17:55.5912] Slim::Control::Request::dump (2433) Param: [useContextMenu] = [1] [10-12-01 22:17:57.8850] Slim::Control::Request::dump (2431) Request: Query [00:04:20:16:01:b8->playlists tracks] from /d3952445/slim/request|40| (Dispatchable) [10-12-01 22:17:57.8869] Slim::Control::Request::dump (2433) Param: [menu_all] = [1] [10-12-01 22:17:57.8886] Slim::Control::Request::dump (2433) Param: [_index] = [0] [10-12-01 22:17:57.8902] Slim::Control::Request::dump (2433) Param: [playlist_id] = [16015] [10-12-01 22:17:57.8924] Slim::Control::Request::dump (2433) Param: [menu] = [trackinfo] [10-12-01 22:17:57.8941] Slim::Control::Request::dump (2433) Param: [_quantity] = [200] [10-12-01 22:17:57.8957] Slim::Control::Request::dump (2433) Param: [textkey] = [R] [10-12-01 22:17:57.8973] Slim::Control::Request::dump (2433) Param: [favorites_title] = [Radio Stations] [10-12-01 22:17:57.8989] Slim::Control::Request::dump (2433) Param: [favorites_url] = [file:///D:/Music/Playlists/Radio_Stations.m3u] [10-12-01 22:17:57.9005] Slim::Control::Request::dump (2433) Param: [useContextMenu] = [1]
But that's not this bug... I'll open a separate bug on what you are seeing. Andy's checkin r31534 is much more likely the culprit of what you are seeing.
I spotted a similar problem with the controller if I have playlist >200 . When I go to "playlist" in my controller and choose to view a playlist somewhere between 200 0r 300 tracks it becomes invisible in that view ? It shows on the NP screen if I choose to play it. Also it works on the Touch ? Should this be a new bug ?
made a new bug for the pl behavior . https://bugs-archive.lyrion.org/show_bug.cgi?id=16789
Album with >500 tracks, browse to tracks---selection plays the correct track 7.6.0.32407 (also message: Playlist full, adding 5000 of 2010 tracks)
*** Bug 16147 has been marked as a duplicate of this bug. ***