Bug 3389 - Random Mix scrambling playlist, not deleting played tracks
: Random Mix scrambling playlist, not deleting played tracks
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 6.5b1
: PC Fedora
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-04 07:19 UTC by Tim Fletcher
Modified: 2009-01-29 09:46 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 Tim Fletcher 2006-05-04 07:19:26 UTC
When playing random songs, the display will sometimes display the wrong track. Here's what happens. From the web interface, Random Mix page, I have the "Now playing will show X upcoming songs and X recently played songs." both set to 5. So I should never see more than 10 songs total in my playlist. It seems like sometimes it does not delete the song at the top of the list when it adds a new one at the bottom of the list. Once it starts doing this, it seems to stop deleting songs altogether. On occasion after listening to a random mix for several hours, I will have a play list several pages long.

One it starts doing this, the server will continue sequentially through the list, but it seems to reshuffle the list of titles each time the track changes. For example, if we have a playlist as follows:

1.  T1
2.  T2
3.  T3
4.  T4
5.  T5
6.  T6 *
7.  T7
8.  T8
9.  T9
10. T10

T6 is currently playing and everything is fine. Once it has finished and we go to play the next track, we could end up with a list that looks like the following:

1.  T5
2.  T7
3.  T4
4.  T9
5.  T3
6.  T2
7.  T11 *
8.  T1
9.  T5
10. T10
11. T6

First of all, we now have 1 more song in the playlist than we should. T7 is now playing, but it is displaying T11. When it advances to T8, it will reshuffle the list again and display a random song name from the list.

I've experienced this in 6.2.2 nightly builds (I haven't tested 6.2.2 release), and 6.5. I cannot reproduce it consistently, but it does happen faily frequently.
Comment 1 KDF 2006-05-04 09:22:16 UTC
If you insist on creating more bugs on the same problem, please try to be VERY specific in the summary so that those of us trying to track it down arent stuck wasting time trying to follow every direction you want to go.
Comment 2 Chris Owens 2006-05-04 10:53:46 UTC
As noted, probably related to bug 2510
Comment 3 Tim Fletcher 2006-05-04 17:10:27 UTC
Point taken about the summary. I've tried to make it more specific. Feel free to change it if you still don't like it. If the consensus is that this should be part of 2510 that's ok with me. However it seemed to me to be a different problem and I doubt it has the same root cause.
Comment 4 KDF 2006-05-04 17:33:03 UTC
I think the reshuffle is key here.  If the user is in shuffle mode, adding new tracks does trigger a reshuffle.  Random play shoudl perhaps ignore shuffle mode (or force it to none).
Comment 5 KDF 2006-05-05 10:11:00 UTC
buried in Control::Commands::playlistXtracksCommand() line 973:
Slim::Player::Playlist::reshuffle($client, $load?1:undef)                   if $load || $add;

This takes the reshuffle a few levels away from the control of the randomplay plugin.  
a) We could add a param to the request specially for this, or 
b) playRandom() can simply turn off shuffle (maybe with a log msg to accompany)

?
Comment 6 Tim Fletcher 2006-06-15 11:00:11 UTC
This appears to be fixed in 6.3.0 build 7895.