Bug 6352 - Random Mix mode doesn't stop on playlist play, etc
: Random Mix mode doesn't stop on playlist play, etc
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 7.0
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-13 13:27 UTC by Andy Grundman
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2007-12-13 13:27:57 UTC
To reproduce:
Start Random Song Mix
Play any XML-based internet source: internet radio station, MP3tunes album, etc.

The RandomPlay plugin looks for the following events to indicate it should stop random mode:

	%stopcommands = (
		'clear'	     => 1,
		'loadtracks' => 1, # multiple play
		'playtracks' => 1, # single play
		'load'       => 1, # old style url load (no play)
		'play'       => 1, # old style url play
		'loadalbum'  => 1, # old style multi-item load
		'playalbum'  => 1, # old style multi-item play
	);

The problem here is that if you do $client->execute( [ 'playlist', 'play', $url ] ); this is not sent as a notification because the isQuery flag is not set for this request.  So RandomPlay never sees this and keeps on going in random mode.

Not sure of the right way to solve this.

CC Fred as he may have some idea why this is not considered a query, or why only query methods get sent as notifications.
Comment 1 Fred 2007-12-13 14:59:14 UTC
Hey unassigned, fixed you :)

Change 15275.

We only notify successful COMMANDS (not queries). The setStatusXXX business drives the successful bit: a successful command was "setStatusDone()"-ed. In this case, the command is asynchronous, so we need to tell Request to postpone it's evaluation of the success of the command, something we do using "setStatusProcessing".
Comment 2 Andy Grundman 2007-12-13 15:08:13 UTC
Thanks for the quick fix. :)
Comment 3 KDF 2007-12-13 15:50:29 UTC
so, marking as fixed.  reopen if anything is wrong here.
Comment 4 Chris Owens 2008-03-07 09:05:18 UTC
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.