Bug 8568 - Random mix adds too many tracks
: Random mix adds too many tracks
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: unspecified
: PC Other
: -- minor (vote)
: 7.x
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-26 09:34 UTC by Max Spicer
Modified: 2009-07-31 10:23 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Spicer 2008-06-26 09:34:45 UTC
If I start a random song mix that should play 10 tracks, random mix actually ends up adding 11 tracks.  It first of all starts 1 track playing, then adds a further 9 (fine so far).  It is then notifed of a 'playlist newsong' command that resulted from the first track being played, and responds by adding another track.  This should not happen.

This is shown in the following log excerpt:

[08-06-26 17:16:52.1753] Slim::Plugin::RandomPlay::Plugin::handlePlayOrAdd (911) RandomPlay: Play button pushed on type 
track
[08-06-26 17:16:52.1756] Slim::Plugin::RandomPlay::Plugin::playRandom (605) Called with type track
[08-06-26 17:16:52.1759] Slim::Plugin::RandomPlay::Plugin::playRandom (630) -1 songs remaining, songIndex = 0
[08-06-26 17:16:52.1918] Slim::Plugin::RandomPlay::Plugin::findAndAdd (376) Starting random selection of 10 items for ty
pe: track
[08-06-26 17:16:52.2439] Slim::Plugin::RandomPlay::Plugin::findAndAdd (474) Find returned 10 items
[08-06-26 17:16:52.2442] Slim::Plugin::RandomPlay::Plugin::findAndAdd (488) Playing track: Goldfinch, 3211
[08-06-26 17:16:52.2978] Slim::Plugin::RandomPlay::Plugin::findAndAdd (507) Adding 9 tracks to end of playlist
[08-06-26 17:16:52.2994] Slim::Plugin::RandomPlay::Plugin::playRandom (789) Playing continuous track mode with 10 items
[08-06-26 17:16:52.2996] Slim::Plugin::RandomPlay::Plugin::playRandom (807) New mix started at 1214497012
[08-06-26 17:16:52.3490] Slim::Plugin::RandomPlay::Plugin::commandCallback (1023) Received command playlist newsong
[08-06-26 17:16:52.3492] Slim::Plugin::RandomPlay::Plugin::commandCallback (1024) While in mode: track, from SoftSqueeze
[08-06-26 17:16:52.3495] Slim::Plugin::RandomPlay::Plugin::commandCallback (1041) New song detected (0)
[08-06-26 17:16:52.3497] Slim::Plugin::RandomPlay::Plugin::playRandom (605) Called with type track
[08-06-26 17:16:52.3499] Slim::Plugin::RandomPlay::Plugin::playRandom (630) 9 songs remaining, songIndex = 0
[08-06-26 17:16:52.3695] Slim::Plugin::RandomPlay::Plugin::findAndAdd (376) Starting random selection of 1 items for type: track
[08-06-26 17:16:52.3725] Slim::Plugin::RandomPlay::Plugin::findAndAdd (474) Find returned 1 items
[08-06-26 17:16:52.3742] Slim::Plugin::RandomPlay::Plugin::findAndAdd (488) Adding track: Outro - Vibranium, 1185
[08-06-26 17:16:52.3789] Slim::Plugin::RandomPlay::Plugin::playRandom (789) Playing continuous track mode with 11 items

I tested against latest 7.2, but suspect this is actually present in 7.0.
Comment 1 KDF 2008-06-26 12:04:27 UTC
if your "upcoming" setting iss 10 then you get 11 songs.  The currently playing song is not counted with either the "previous" or "upcoming".  ie, if you set both settings to 11, then you get a total of 3 songs.  

please verify your upcoming and previous settings.
Comment 2 Max Spicer 2008-06-26 12:09:29 UTC
Have a look at the attached log for the bit where it says (1023) Received command playlist newsong.  It shouldn't respond to this, which is what's causing the extra track.
Comment 3 Chris Owens 2008-06-30 09:48:44 UTC
Is this affecting some plugin or other work you're working on Max, or is this just something that's bugging you? :)
Comment 4 Max Spicer 2008-06-30 10:18:33 UTC
No, it's just a bug I noticed when I was testing random mixes as alarm playlists.  The end result is confusing if you're paying attention, but otherwise minor.
Comment 5 KDF 2008-07-05 17:10:29 UTC
again, once one song starts, having 10 "upcoming tracks" is an 11-song playlist. Thus, after the first song starts (a new song event) then a new "upcoming" track gets added.

 In fact, this behaviour is the result of an older bug report (number not known offhand, or perhaps it was just a post thread) complaining that 10 songs in a playlist was incorrect if the settings is for 10 "upcoming" songs.  Case in point, try 1 upcoming and 1 previous as a setting.  Without the current behaviour, you get 1 track, which is odd.

Again, please confirm your settings just to be certain of what we're talking about.
Comment 6 Chris Owens 2009-07-31 10:23:19 UTC
Reduce number of active targets for SC