Bugzilla – Bug 3688
Pagebar offset incorrect (off by one)
Last modified: 2008-09-15 14:39:24 UTC
The pagebar offset in the web interface is incorrect (clicking on "A" shows you all entries beginning with "B"). This patch (to server/Slim/Web/Pages.pm) should fix it. Index: Pages.pm =================================================================== --- Pages.pm (revision 8256) +++ Pages.pm (working copy) @@ -378,6 +378,7 @@ my $first = $results->first; + # Set offset for first letter row to 0 (no utf8decode here?) $alphamap{$first->get_column('letter')} = 0; $itemCount += $first->get_column('count'); @@ -387,9 +388,11 @@ my $count = $row->get_column('count'); my $letter = $row->get_column('letter'); + # Set offset for subsequent letter rows to current $itemCount + # (*before* we add number of items for this letter to $itemCount!) + $alphamap{Slim::Utils::Unicode::utf8decode($letter)} = $itemCount; + $itemCount += $count; - - $alphamap{Slim::Utils::Unicode::utf8decode($letter)} = $itemCount; } } else {
Created attachment 1314 [details] Patch
possibly related to bug 3540
Yes, this should fix 3540. I probably should have submitted this patch there, but didn't find that bug as I was searching for "pagebar"...
saerch is hard with so many ways of expressing things. Searching through the comments, instead of the summaries is usually a bit more efffective. Use the advanced search to do this.
Fixed in change 8290 Thanks
*** Bug 3540 has been marked as a duplicate of this bug. ***