Bug 4222 - Menu limits displayed entries beginning with 'Z'
: Menu limits displayed entries beginning with 'Z'
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.5b3
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-26 11:46 UTC by Matt Richards
Modified: 2008-12-18 11:11 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Richards 2006-09-26 11:46:51 UTC
Further to my attempts to implement a workaround for the issues discussed in Bug 4020 (sorting of '[' character), I tried retagging a large number of items in my library by prepending "ZZ_" onto the artist, title, and album, in order to sort them to the end of the list(s).

When I list the artists at the end of the alphabet now, I get this:

1538 albums with 31723 songs by 778 artists. 
Items 523 to 572 of 778 
1 A B C D E F G H I J K L M N O P Q R S T U V W Y Z     (Y and Z boldfaced)

All Albums
Yartist1
Yartist2
Yartist3
Yartist4
Yartist5
Yartist6
Zartist1
Zartist2
Zartist3
Zartist4
ZZ_segregatedartist01
ZZ_segregatedartist02
...         (segregated artists 3..39)
ZZ_segregatedartist40

Possibly the display on the final page is limited to 50 entries no matter how many entries are actually present?  That certainly is not a limit on the other pages in the menus; I have one that shows 200 entries.  In this case, as far as I can tell there is no way to see items 573 of 778.

The same things seems to happen for albums.

Although my particular case is pathological, I believe this is a legit bug.  The system should not artificially limit the number of Y and/or Z entries.

Unfortunately, for me personally,  this means that the workaround that was suggested to me for the other bug, to put something on the front of the tags to get everything to sort together, is not working.  Possibly it would have worked if I had used 00 or AA, but I really prefer this stuff to come at the end.
Comment 1 Chris Owens 2006-10-12 13:01:48 UTC
I can reproduce this.  Dan, please let me know if you want the test files I created to repro.

I created a large number of files with different title, artist, and album tags.  When you go to the last page of artists listed, there are still many after that with no way to get to them.

A kludgy workaround is to set the Server Settings -> Interface -> Items Per Page to a value larger than the number of artists that you have in your collection.  Then all artists will appear on the same page.
Comment 2 Chris Owens 2006-10-13 15:14:19 UTC
I should specify that, as Matt did, I set the artist tags to all begin with "ZZ_"
Comment 3 Matt Richards 2006-10-15 09:23:58 UTC
>>A kludgy workaround is to set the Server Settings -> Interface -> Items Per
Page to a value larger than the number of artists that you have in your
collection.  Then all artists will appear on the same page.<<

Kludgy, but it does help, thanks.  I settled on setting the items per page to somewhat more than half the total number of artists, so that the first page gives a good chunk of them and the second page gives all the rest, and avoids the bug.  Setting the items value to a big enough number to bring them all up in one go caused a fairly long delay for the page to come up, which I didn't like, so I cut it to something more than half.
Comment 4 Matt Richards 2007-04-11 06:25:51 UTC
As an additional note, having rolled back to 6.3 to test another bug, I note that this problem does not exist in 6.3.  It appears that the Z choice can have as many entries as it needs.  I set the number of items displayed back to 50 (having had it at 425 to work around this bug), and the menu for "Z" displays something over 200 items.
Comment 5 KDF 2007-04-13 18:50:28 UTC
possible fix:

Index: Slim/Web/Pages.pm
===================================================================
--- Slim/Web/Pages.pm   (revision 11761)
+++ Slim/Web/Pages.pm   (working copy)
@@ -509,6 +512,10 @@
                                unshift @pagestarts, $nextend;
                        }
                }
+
+               if ($newend == $end && $itemCount > $end) {
+                       $newend = $itemCount -1;
+               }
 
                $pageinfo{'enditem'}         = $newend;
                $pageinfo{'totalalphapages'} = scalar(@pagestarts);
Comment 6 Chris Owens 2007-04-16 09:00:13 UTC
Hm.  KDF, in Dan's absence, should I try to get Dean to review your changes?  I'll try it and see what happens.
Comment 7 KDF 2007-04-16 09:41:42 UTC
Someone who is more readily able to reproduce the problem should give it a run and let me know.  I happened to have a set with 3 V artists at index 50, 51 and 52, which showed the problem on a 50-per page setting. It worked for my case, but at least one other confirmation would be good.  Dan used to confirm based on his ability to just know what works. Until there is someone else as "lead" then I'll be happy with any one confirming.  
Comment 8 Jim McAtee 2007-05-07 01:34:59 UTC
I just tested the patch and it works for me.
Comment 9 KDF 2007-05-07 09:40:29 UTC
Thanks Jim, assigning to me so that I remember to take care of this tonight.
As this is targetted for 7.0, I'll only commit to trunk, unless Chris feels it's worth moving to 6.5.2 as well given the second report (bug 4969), which I'll mark off as a dupe 
Comment 10 KDF 2007-05-07 09:41:42 UTC
*** Bug 4969 has been marked as a duplicate of this bug. ***
Comment 11 KDF 2007-05-09 15:19:43 UTC
re-targetting for tonight's build.
Comment 12 KDF 2007-05-09 15:20:28 UTC
*** Bug 4969 has been marked as a duplicate of this bug. ***
Comment 13 KDF 2007-05-09 19:49:33 UTC
fixed in 6.5.2 at change 11947 and trunk at change 11948.
please reopen if there are any problems.
Comment 14 Matt Richards 2007-05-22 10:48:57 UTC
This now works properly for me.  Thank you.
Comment 15 Chris Owens 2007-05-22 12:10:23 UTC
Fixed in 6.5.2, which is now released and available for download at http://www.slimdevices.com/su_downloads.html

If you're still experiencing this bug, please re-open it!