Bug 5145 - RandomMix strangely passing to RandomSongMix from RandomAlbumMix
: RandomMix strangely passing to RandomSongMix from RandomAlbumMix
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 6.5.2
: PC Debian Linux
: P2 normal (vote)
: ---
Assigned To: Spies Steven
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-02 15:04 UTC by Robin V.
Modified: 2012-02-27 17:33 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
always set mix type, as otherwise it can fall back to track mix (568 bytes, patch)
2007-07-03 04:43 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin V. 2007-07-02 15:04:16 UTC
After a full index/restart of SS:
- switch on SB
- browse the SB menu to RandomMix->RandomAlbumMix
- Press Play

A first album is randomly put in the playlist. 
If the album is long enough, at the end of the album, the SS add RandomSongs in the mix.
If the album is short enough, random songs are directly put at the end of the playlist.

Here's a sample of plugin log with a short album:

 2007-07-02 23:59:05.8633 RandomPlay: Play button pushed on type album
2007-07-02 23:59:05.8638 RandomPlay: playRandom called with type album
2007-07-02 23:59:05.8643 RandomPlay: 10 songs remaining, songIndex = 0
2007-07-02 23:59:05.9776 RandomPlay: Starting random selection of 1 items for type: album
2007-07-02 23:59:06.0003 RandomPlay: Find returned 1 items
2007-07-02 23:59:06.0012 RandomPlay: Playing album: Various positions, 32
2007-07-02 23:59:06.1457 RandomPlay: Playing static album mode with 9 items
2007-07-02 23:59:06.4935 RandomPlay: received command playlist newsong
2007-07-02 23:59:06.4939 RandomPlay: while in mode: , from salon
2007-07-02 23:59:06.4945 RandomPlay: new song detected (0)
2007-07-02 23:59:06.4948 RandomPlay: playRandom called with type
2007-07-02 23:59:06.4951 RandomPlay: 8 songs remaining, songIndex = 0
2007-07-02 23:59:06.6147 RandomPlay: Starting random selection of 2 items for type: track
2007-07-02 23:59:06.6747 RandomPlay: Find returned 2 items
2007-07-02 23:59:06.6757 RandomPlay: Adding track: Le soleil suffit, 724
2007-07-02 23:59:06.6918 RandomPlay: Adding 1 tracks to end of playlist
2007-07-02 23:59:06.7055 RandomPlay: Playing static track mode with 11 items


I think there's something strange there:
2007-07-02 23:59:06.4939 RandomPlay: while in mode: , from salon

(my whole CD collection is flag, tagged, a handful of albums in mp3, no itunes plugin).
Comment 1 Michael Herger 2007-07-02 21:58:11 UTC
RandomMix knows to options to define how many upcoming and recently played songs should remain in the list. Can you play with these value and confirm that they're related to the length needed for the playlist to trigger your issue?
Comment 2 Robin V. 2007-07-03 02:01:14 UTC
I'll do it, what values do you recommand I try ? Something like 1/1, 0/1, or rather 0/100, 10/100?

I've looked at the code where the strange log message is done, it's in sub commandCallback around line 650 of Plugins/RandomPlay/Plugin.pm. Not really sure the problem is there, but this blank "mode type" seems strange to me.

msgf("RandomPlay: while in mode: %s, from %s\n", 
   $mixInfo{$client->masterOrSelf->id}->{'type'}, $client->name);

As I said, the problem occured either when pressing "play" from the plugin menus if the album is short or without any user action when play hits the end of the first random album. So this commandCallback function could be a good starting point to investigate.
Comment 3 Michael Herger 2007-07-03 04:24:47 UTC
Robin, I'm not sure it's related to the length after all. But do you have the "Add new items when old ones finish" option disabled? If you do, does enabling it change the behaviour?
Comment 4 Michael Herger 2007-07-03 04:30:11 UTC
It isn't that option neither, sorry for the confusion.
Comment 5 Michael Herger 2007-07-03 04:43:53 UTC
Created attachment 2060 [details]
always set mix type, as otherwise it can fall back to track mix

Please give this patch a try. It's against the latest 6.5.3 branch, but simple enough to do manually, if you're on 6.5.2
Comment 6 Robin V. 2007-07-03 05:04:28 UTC
Where should this parameters be? I remember changing them, but right now, I can't find them. I get back to default skin and still can't find them. Disabled a couple of unofficials plugins... and still can't find them.

Either it's a part of our problem or I'm not well awaken. I don't remember, it's possible that I saw this parameters on the windows version of SS and now, on this linux SS they never had been visible.
Comment 7 Robin V. 2007-07-03 05:06:56 UTC
I'll try this patch this evening, I'll also try to limit the "genres selected" as I've just verified this bug with "all genres selected".
Comment 8 Robin V. 2007-07-03 07:01:25 UTC
Ok, it seems to work, should I close it and put it in milestone 6.5.3 ?

As we were talking about it, could you still tell me where to find the options we discussed earlier? I still can't find them and I begin to wonder about my mental health ;).
Comment 9 Robin V. 2007-07-03 07:04:39 UTC
Forget it! Thinking about it I recall it must be in the "genre selection" panel ! :)
Comment 10 Michael Herger 2007-07-03 07:39:48 UTC
Although that patch looks rather save to me I'd like to have a second opinion on this.
Comment 11 Chris Owens 2007-07-03 08:46:41 UTC
Steven could you try applying this change and testing RandomMix?
Comment 12 KDF 2007-07-03 12:42:29 UTC
just as a note, change 11445 already included a very similar change for trunk.
Comment 13 Robin V. 2007-07-03 13:53:26 UTC
I don't know if it has anything to do with the problem (solved problemthere) but the parameter XXX was blank on my SS.

"and XXX recently played songs."
Comment 14 Michael Herger 2007-07-03 14:07:44 UTC
Thanks kdf - this is change 12330 for 6.5.x (only the above patch)
Comment 15 James Richardson 2012-02-27 17:33:19 UTC
Closing resolved bugs - if you feel this bug still exists please first re-test
with the latest SW/FW version.  If you are able to reproduce then feel free to
reopen and attach new logs / steps to reproduce.