Bugzilla – Bug 6872
"Play only selected song" setting not respected
Last modified: 2008-12-18 11:12:53 UTC
Running SVN 17002 (trunk). With "Play only selected song" chosen for the player I'm using, if I try to play one song with Music Library > Artists > Some Artist -> Some Album -> Some Song and press Play, the Squeezebox will play the whole album starting with the selected song, when it should simply play the song I selected.
This is working fine for me. What is the setting for all instances of "playtrackalbum" in server.prefs. Note: this is now a per-player setting, so make sure that it's set the way you want for the client. If the setting is not found for the given client, it will fall back to the server setting (or the default server setting which is to play all)
working for me too. Do you see this in the web UI, player or SBC?
This is with the IR remote on a SB2. The player settings page for the client in question shows the "Play only selected song" option. I'll have to get back to you on the prefs. I did check that, but I don't remember what the value was (that's the trouble with these settings that have numeric values!). I have not tried reproducing the problem with web or SBC UIs, this is just something my wife has complained about since I switched our server to SC7. Generally I use not the first track in the album, but at least the 2nd or 3rd song. I also saw this behavior on an SB3 from the Music Folder browse view, though I should double-check the player settings for that client.
I just tested again with SoftSqueeze and an SVN checkout, after emptying out my Plugins dir to be more certain. Same behavior. The playtrackalbum setting for SoftSqueeze was "0" but the *server* playtrackalbum was "1". I shut down SC7 and edited server.prefs, changing the server playtrackalbum to "0". Now I have the behavior I want -- but clearly SC7 seems to be looking at the server pref and ignoring the client pref.
Michael and I have tried this. Server setting is 1, player setting is 0 and it works (yes, I'm using Softsqueeze) For Most browse cases this is controlled in Slim::Buttons::BrowseDB, which has the code: my $playalbum = $prefs->client($client)->get('playtrackalbum'); # if player pref for playtrack album is not set, get the old server pref. if (!defined $playalbum) { $playalbum = $prefs->get('playtrackalbum'); } 0 should still return true. BrowseTree (used for Browse Music Folder) has the same code, so should have the same behaviour. Lets try a test. Change the lines above to: my $playalbum = $prefs->client($client)->get('playtrackalbum'); use Data::Dump; Data::Dump::dump("Player Pref:",$playalbum); # if player pref for playtrack album is not set, get the old server pref. if (!defined $playalbum) { $playalbum = $prefs->get('playtrackalbum'); } Data::Dump::dump("Server Pref:",$prefs->get('playtrackalbum'),"Final value:",$playalbum); You should then see something like this in the log: [15:53:51.2349] Data::Dump::dump (100) Warning: ("Player Pref:", 0) [15:53:51.2370] Data::Dump::dump (100) Warning: ("Server Pref:", 1, "Final value:", 0) Lets see what comes up on your system.
OK, we're getting there. It looks like a web UI problem. The web UI suggested that each player had "Play only selected song", but the YAML didn't have playtrackalbum settings for most players. egrep '^(_client| playername|playtrack| playtrack)' prefs/server.prefs In order to use a normal UI to actually make the player behave the way the web UI suggested they should, you would have to change the setting to "Play other songs in album or directory", Apply that (to set the client pref), and then go back to "Play only selected song" and Apply that to go back to what I wanted. It would be better if the web UI would have three options, like Use default Play only selected song Play other songs in album or directory ... and if there were an obvious place to set the global playtrackalbum pref. Where is that? If the global pref is not exposed, then the basic player settings handler should set the client pref to the global/server value before it ever displays any HTML, so users like me won't see "Play only selected song" in the list and think that's an indication of status for that player when really we're just seeing our browser default to the first item in the input control.
So, basically the per-player default is missing. The rationale behind that was to not obliterate the case where a user has chosen something other than the default previously. The right thing here is to check the player pref when loading the settings page. If it's undefined, then we should grab the server pref, show that, and write the player pref to match.
in fact, migration ought to do the trick: Index: server/Slim/Utils/Prefs.pm =================================================================== --- server/Slim/Utils/Prefs.pm (revision 17066) +++ server/Slim/Utils/Prefs.pm (working copy) @@ -331,6 +331,16 @@ 1; } ); + #migrate 'play other songs' pref from server to per-player + $prefs->migrateClient( 4, sub { + my ( $cprefs, $client ) = @_; + my $playtrackalbum = preferences('server')->get('playtrackalbum'); + + # copy server pref as a default client pref + $cprefs->set( 'playtrackalbum', $playtrackalbum ); + 1; + } ); + # initialise any new prefs $prefs->init(\%defaults);
change 17078 - thanks for the digging and the patch. I added a condition to prevent resetting existing values.
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.