Bug 1967 - BrowseDB not keeping last selection for Artists and Albums
: BrowseDB not keeping last selection for Artists and Albums
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: 6.2.0
: All All
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-12 23:45 UTC by KDF
Modified: 2005-08-13 00:23 UTC (History)
0 users

See Also:
Category: ---


Attachments
dereference selection arrays (575 bytes, patch)
2005-08-12 23:46 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KDF 2005-08-12 23:45:34 UTC
I believe its due to the new contributor.role array.  the selection key gets
created and then includes an array ref.  This ref isn't the same ref on
re-entering so the lastSelection just gets lost and the hash grows without limit.

This is after just a bit of browsing:
$VAR1 = {
          'genre,artist,album,track:0:' => 9,
          'artist,album,track:0:contributor.role=ARRAY(0x9c1ef58)' => 4,
          'age,track:0:' => 3,
          'album,track:0:contributor.role=ARRAY(0xa288554)' => 13,
          'album,track:0:contributor.role=ARRAY(0x94cea58)' => 1,
          'artist,album,track:0:contributor.role=ARRAY(0x94ce2d8)' => 5,
          'album,track:0:contributor.role=ARRAY(0x94c9d30)' => 10,
          'album,track:0:contributor.role=ARRAY(0x9aedeb8)' => 13,
          'album,track:0:contributor.role=ARRAY(0x9aede4c)' => 8,
          'album,track:0:contributor.role=ARRAY(0xa01a700)' => 6
        };


I think the right thing here must be to check for the ref and dereference.  it
seems to work, but maybe I'm not getting all of the right data.  patch coming
shortly.
Comment 1 KDF 2005-08-12 23:46:32 UTC
Created attachment 720 [details]
dereference selection arrays
Comment 2 Dan Sully 2005-08-12 23:47:43 UTC
Looks good.
Comment 3 KDF 2005-08-13 00:05:24 UTC
ok, comitted at change 3957.
it works, but I'm a bit lost on where the array ref suddenly appeared when the dereference just shows a 
single number
Comment 4 Dan Sully 2005-08-13 00:07:29 UTC
It's being interpreted as a scalar value. You should use join('', @{$v}) instead.. sorry about that.
Comment 5 KDF 2005-08-13 00:23:26 UTC
ah ok, right....contributor role 1 and 5.  thanks