Bugzilla – Bug 4955
items per page preference off by 1
Last modified: 2008-12-18 11:12:53 UTC
Server settings -> Interface -> Items Per Page. I set this to 1, and browse -> artists it shows 2 artists. I set the Items Per Page to 2, again browse -> artists, there are 3 listed.
This may be due to the list be alpha indexed. We have to split on letter boundaries, so the items per page is only a "guideline" to allow each letter index at the top to find the right page. Years, New Music and any numerically paged lists should match exactly.
I'm not sure I understand your comment. As an example when I limit items per page to 1, I'm seeing All albums, Astor Piazzolla, and Chopin. Are you saying this is something we may not be able to repair? If so maybe we should consider documenting this in some way in server settings -> interface -> Items Per Page? KDF I hope you don't mind me adding you as a CC to this bug.
In order for the alpha links to work, we have to keep page boundaries from splitting letters. For instance, if you had 24 artists starting with B and an items per page of 6, then which page would the "B" link go to? The current design answers this by lumping the B artists on one page. If the Items per page were to change to 13 then the page would have all 12 B artists, then likely all of the C artists as well. With the alpha listings, we can only have 36 pages for a latin character based library (26 letters, 10 digits), so if you have more than 36 artists they'd have to fit somewhere. Pick a letter that has lots of albums or artists and you should see that it's not just "off by 1". If you browse music folder (which is a numerical paging in Default skin) then the items per page will be used. Alphabetical listings, it simply sets the minimum. It is easy enough to fix as far as sticking to exactly 1 per page, but then the problem of how to link to all of the rest is a much harder thing to handle, perhaps something like bug 2170
I just did a bit of testing and can verify that there is an off-by-one error in the alpha paging. For instance, I set items per page to two, and I have two artists that begin with '1', but the alphapagebar splits the page such that it also includes the 'A' artists. It's also easily seen when browsing genres, where the number of genres is generally small and splitting on letter boundaries has less of an effect. The number of genres placed on a page is never N, but sometimes N+1. But this is a pretty minor bug, at worst. It's only going to be obvious when items per page is set fairly low.
Agreed; changing severity and priority. I'm sure Chris would prefer we hold off on this until after 6.5.2, thanks KDF and Mr. Zolx!
Created attachment 2495 [details] possible fix I think this is working, but it took long enough that it may just look like it does.
> I think this is working, but it took long enough that it may just look like it > does. Kevin, I really hope that I get the chance to buy you a drink some day.
fixed at change 15168. please reopen if there are issues.
This bug is being closed since it was resolved for a version which is now released! Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html If you are still seeing this bug, please re-open it and we will consider it for a future release.