Bug 15033 - Selection of single Napster tracks
: Selection of single Napster tracks
Status: CLOSED FIXED
Product: SB 2/3
Classification: Unclassified
Component: Audio
: 130
: PC Windows XP
: P2 normal (vote)
: 7.5.0
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-03 12:34 UTC by holla1235
Modified: 2010-04-08 17:24 UTC (History)
3 users (show)

See Also:
Category: Feature


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description holla1235 2009-11-03 12:34:54 UTC
In Version 7.3.3 I was able to play a single Napster track by pressing the Play button on the RC. It would have deleted the actual play list, transfered the selected track to the actual play list and started playing - all with one pressed button.

Nowadays (from V7.4.0 on) pressing the Play button after selecting a single Napster track adds all track from the search result or album to the actual play list. In order to get the functionality described above, I must perform the following steps:

- delete the actual play list
- search for the desired track
- press Add button
- go back to the actual play list
- press Play button

Very complicated. Please provide the "old" functionality again. Thank you very much.

Best regards,
Ralf.
Comment 1 James Richardson 2009-11-03 18:29:00 UTC
Matt: is this a bug, or a design feature?
Comment 2 Chris Owens 2009-11-09 09:24:49 UTC
This was a design decision.  Despite that, Matt Weldon, the concensus of the bug meeting is that this behavior is crazy.  Was there a good reason for it?
Comment 3 Ben Klaas 2009-11-10 07:59:24 UTC
This may be easier to solve in XMLBrowser than I purported at the last bug meeting (sorry, I have a knee jerk reaction to XMLBrowser that it's a black hole where any change made causes other problems elsewhere; may not be the case here)

Local music does different behavior when the pref (it's a player pref) is set for playtrackalbum vs. not set. The default pref is playtrackalbum to be on, but if the user has unset this, we should honor that setting in XMLBrowse items.

we do this for local music by checking first for the player pref and then the server pref like so:

    if ( $request->client ) {
                $playalbum = $prefs->client($request->client)->get('playtrackalbum');
        }

        # if player pref for playtrack album is not set, get the old server pref.
        if ( !defined $playalbum ) {
                $playalbum = $prefs->get('playtrackalbum');
        }

if playalbum is set then the command callback is rewritten:

   if ( $playalbum && ! $partyMode ) {
                                                $actions->{'play'} = {
                                                        player => 0,
                                                        cmd    => ['jiveplaytrackalbum'],
                                                        params => {
                                                                list_index => $index + $listIndex,
                                                                folder     => $topPath,
                                                        },
                                                        nextWindow => 'nowPlaying',
                                                };
                                        }


in XMLBrowser, there is only a small section of code that handles all of this:
 if ( @urls ) {

                                        if ( main::INFOLOG && $log->is_info ) {
                                                $log->info(sprintf("Playing/adding all items:\n%s", join("\n", @urls)));
                                        }

                                        if ( $method =~ /play|load/i ) {
                                                $client->execute([ 'playlist', 'clear' ]);
                                        }

                                        my $cmd;
                                        if ($method =~ /add/) {
                                                $cmd = 'add';
                                        }
                                        else {
                                                $cmd = 'inserttracks';
                                        }

                                        my $play_index = $request->getParam('play_index') || 0;

                                        $client->execute([ 'playlist', $cmd, 'listref', \@urls ]);

                                        # if we're adding or inserting, show a showBriefly
                                        if ( $method =~ /add/ || $method eq 'insert' ) {
                                                my $icon = $request->getParam('icon');
                                                my $title = $request->getParam('favorites_title');
                                                _addingToPlaylist($client, $method, $title, $icon);
                                        # if not, we jump to the correct track in the list
                                        } else {
                                                $client->execute([ 'playlist', 'jump', $play_index ]);
                                        }
                                }

I think we just need to do a check for the pref here, format the command name correctly, and not do the playlist jump command if the user doesn't want the remaining tracks.

Andy, to you for comment, then you can send back to me. I'm ramping this up to a 7.5 P2 bug.
Comment 4 Andy Grundman 2009-11-10 08:02:26 UTC
Agreed, I think that area of the code is the only thing that needs to change to fix this.
Comment 5 SVN Bot 2009-11-10 08:44:28 UTC
 == Auto-comment from SVN commit #29225 to the slim repo by bklaas ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29225 ==

Fixed Bug: 15033
Description: only play one track when
Player Settings->Basic Settings->Play Other Songs in Album is set to "play only selected song"
Comment 6 Chris Owens 2010-04-08 17:24:38 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!