Bug 512 - Zapping songs from playlist always selects first song
: Zapping songs from playlist always selects first song
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 5.x or older
: All All
: P2 minor (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-25 11:58 UTC by Chris Harris
Modified: 2009-09-08 09:28 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 Chris Harris 2004-08-25 11:58:45 UTC
If you add a bunch of songs to a playlist and then visit the 'Now Playing' view,
you can scroll through the songs.

Clicking 'Add' removes the song you're currently viewing from the playlist.

Holding 'Add' you would expect to move the song you are currently viewing into
the 'Zapped Items' playlist, but instead it always moves the first item in the
playlist.
Comment 1 KDF 2004-08-26 13:10:37 UTC
holding add to use the Zap feature is intended to remove the currently playing
song from the playlist. The idea being that as you listen, it can be used to put
certain song aside for later review.
Comment 2 KDF 2004-08-27 11:44:52 UTC
does it always remove the first song, or is it just because you are zapping
while the first song is the currently playing or currently stopped on song?
Comment 3 Chris Harris 2004-08-27 12:32:23 UTC
I think the behaviour is because I had the player stopped.

I expected a lengthy press of 'Add' (zap) to work the same as a quick press of
'Add' (delete).
Comment 4 KDF 2004-08-30 11:04:46 UTC
I just tested this, stopped on song 4 of 7, viewing 6 of 7. Pressing and holding
'ADD' displayed "Moving song to zapped playlist" and it removed song 6 of 7. I'm
not able to see the problem you are describing, myself. Looking at the code, it
should show the message based on the cirrently viewed song, and move the
curently viewed song.  I haven't seen any change to this part of the code, but
you might want to try the latest nightly just in case I've just not noticed a
recent change.
Comment 5 Chris Harris 2004-08-30 13:24:33 UTC
The latest nightly doesn't seem to exhibit this - the zapped song is now the one
you are viewing, not the first in the playlist.

Either I'm crazy, or it got fixed :-)
Comment 6 Blackketter Dean 2004-08-30 14:04:56 UTC
Sorry, it did get fixed on August 25th.  Forgot to update the bug.  Close it if you can't reproduce.
Comment 7 KDF 2005-09-07 11:09:19 UTC
This seems to work fine for me:

2005-09-07 11:08:39.9453  Executing command f0:5a:f4:24:93:98: button (zap)
(3202.906) (1) () () () ()
2005-09-07 11:08:39.9504  Executing command f0:5a:f4:24:93:98: playlist (zap)
(3) () () () () ()
2005-09-07 11:08:39.9510  Executing command f0:5a:f4:24:93:98: playlist (delete)
(3) () () () () ()

This is while playing track 1, looking at track 4 of 5 in the playlist.  Also
same output when moved to playing track 2, looking at track 4 of 4. In both
cases, the shown track is deleted. current nightly 6.2.0
Comment 8 Blackketter Dean 2005-09-07 13:36:47 UTC
Unable to reproduce.  Reopen if we've got a reproducable case.
Comment 9 Philip Meyer 2005-09-07 15:17:34 UTC
I was using 6.2b1 - 4156 when it went wrong this morning.  I have upgraded to 
the latest nightly 6.2b1 - 4189, and the problem still occurs for me 
(recreateable).  It's quite specific:

1. Have a current playlist with several items in it.
2. Play the 2nd item.
3. Press Up to view the 1st item.
4. Press and hold "Add" to perform a "Zap".  This zaps the currently playing 
item, instead of the viewed item.

If I "delete" the first item by single-pressing "Add", this deletes the viewed 
item, not the currently playing item, as expected [Correct Behaviour].

If I view a different item, such as the third item and perform a zap, it does 
delete that viewed item [Correct Behaviour], so it would appear to be a 
specific problem with the first item in the currently playing list.

My  zapped playlist now contains 6 identical songs, so I think the zap feature 
is adding the viewed item to the zapped playlist, but actually removes the 
currently playing song.
Comment 10 KDF 2005-09-07 15:32:56 UTC
Problem is line 952 of Control/Command.pm:
				my $zapindex = $p2 || Slim::Player::Source::playingSongIndex($client);;


First, off the second semi-colon needs to go.
Second, if the first song is zapped, then $p2 is 0, thus the playingSongIndex is
used. the line should probably be:
my $zapindex = defined $p2 ? $p2 : Slim::Player::Source::playingSongIndex($client);
Comment 11 KDF 2005-09-07 17:39:43 UTC
fixed in trunk at change 4196
Comment 12 Chris Owens 2006-06-16 14:41:55 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.
Comment 13 Chris Owens 2008-12-18 11:51:35 UTC
Routine bug db maintenance; removing old versions which cause confusion.  I apologize for the inconvenience.