Bug 3882 - album sort order pulldown not persistent
: album sort order pulldown not persistent
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.5b1
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-07 23:55 UTC by KDF
Modified: 2008-09-15 14:39 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
full diff (1.96 KB, patch)
2006-08-11 20:09 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KDF 2006-08-07 23:55:18 UTC
The new pulldown doesn't seem to stick on a full window refresh.  I had it set to artist, year, album.  On a refresh, it came up as "album" and the list is sorted by album name again.

Also, when selecting the sort order, sometimes it is switching from gallery to list view at the same time.
Comment 1 KDF 2006-08-08 00:15:52 UTC
gallery to list view issue fixed at change 8856
Comment 2 Dan Sully 2006-08-11 08:47:27 UTC
Should a cookie be used here?
Comment 3 KDF 2006-08-11 08:53:44 UTC
that's one option.  web/http.pm would have to feed an existing cookie through to TT the same way we do for artwork.
I can probably get something working during a break today.  the only part I'm unsure about is getting the pulldown to show the current state on load.  I do that with the browse pulldown, but it's always painful.
Comment 4 KDF 2006-08-11 10:17:47 UTC
fix is along the lines of:

add to common.js at lnie 103:
setCookie( 'SlimServer-orderBy', option );


add to Web/HTTP.pm around line 703:
# Check for the album order cookie.
if ($params->{'cookies'}->{'SlimServer-orderBy'} && 
  $params->{'cookies'}->{'SlimServer-orderBy'}->value) {
  $params->{'orderBy'} = $params->{'cookies'}->{'SlimServer-orderBy'}->value unless defined $params->{'orderBy'};
}


The only possible issue here is that orderBy is really only applicable on the album levels, so far.  This has no affect currently on other levels, but if we were to introduce different order sets for different levels we would have a problem.  There is no knowledge of the levelName in this part of the code.
Comment 5 KDF 2006-08-11 20:09:48 UTC
Created attachment 1416 [details]
full diff

this is the full diff for above with changelog entry.
Comment 6 Dan Sully 2006-08-17 12:05:03 UTC
Ok, let's go ahead and do this, since I don't have a better suggestion.
Comment 7 KDF 2006-08-18 00:20:30 UTC
done at change 9029