Bug 3297 - Random play always continues in random song mode after restart
: Random play always continues in random song mode after restart
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.5b1
: PC Windows XP
: -- enhancement with 2 votes (vote)
: Future
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-19 10:51 UTC by VolkerOth
Modified: 2011-11-06 23:23 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description VolkerOth 2006-04-19 10:51:04 UTC
When the server was in random album mode and is stopped (shut down) and started again, it will continue with the play list, but change to random song mode. So as soon as new titles are added to the playlist (since all the remaining songs were played), this is done in random song mode, not in random album mode.
Comment 1 KDF 2006-04-21 15:14:52 UTC
HEre is my idea:

change the current pref 'plugin_random_keep_adding_tracks', and have it store 0,1,tracks,album,artist as values.  This way, the last selected mode can be persistent over server restarts.

On startup, a callback is created to watch for track change.  This calls playRandom no matter what.  I'd like to change this to check the pref before calling playRandom.  This way, if the pref is 0, nothing happens.  If the pref is 1 or "track" then we add a track.  If the pref is 'album' or 'artist' then we can call playRandom with that mode.

If that sounds like the right way to go, I can create and test a patch tonight.
Comment 2 KDF 2006-04-21 15:25:09 UTC
oh, just looked at the history of the plugin.  It looks like pre-svn6002 the plugin would be disabled after restart (by checking $type{client} at line 529.  To do the same thing, this was converted to:
 if (!defined $client || !defined $mixInfo{$client}) {

However, %mixinfo is used for type, and starttime per client.  Thus, to check type it should be:
if (!defined $client || !defined $mixInfo{$client}->{'type'}) {

I guess it just depends on whether Rancom play should persist across restarts or not.


Comment 3 Dan Sully 2006-04-22 15:26:16 UTC
Dean - thoughts?
Comment 4 KDF 2006-05-12 20:19:58 UTC
applied above fix to trunk at change 7412 since it was also needed for bug 3415.  Marking as an enhancement at this point, since the option to have the random mode persist over restarts would appear to be a design change. The fix should effectively avoid the switch to track mode on startup, and would match previous code that would have done nothing on a server restart.

Comment 5 Spies Steven 2007-03-23 14:25:00 UTC
*** Bug 4838 has been marked as a duplicate of this bug. ***
Comment 6 Alan Young 2011-11-06 23:23:08 UTC
Unassigned bugs cannot have a priority.