Bugzilla – Bug 2259
Random Mix fails to stop on playlist "play" and "load" commands
Last modified: 2009-09-08 09:25:05 UTC
Show in log below, an alarm loading a pre-set playlist uses the playlist "load" command. This fails to stop random mode despite the changing of the playlist. I could change this myself, but perhaps this was done for some specific reason. log as follows: 2005-10-05 10:29:00.1538 RandomPlay: received command stop 2005-10-05 10:29:00.1546 RandomPlay: while in mode: track, from SoftSqueeze 2005-10-05 10:29:00.1552 Returning array: stop () () () () () () () 2005-10-05 10:29:00.1557 Executing command f0:5a:f4:24:93:98: mixer (volume) (20) () () () () () 2005-10-05 10:29:00.1568 RandomPlay: received command mixer volume 20 2005-10-05 10:29:00.1658 RandomPlay: while in mode: track, from SoftSqueeze 2005-10-05 10:29:00.1666 Returning array: mixer (volume) (20) () () () () () 2005-10-05 10:29:00.1674 Executing command f0:5a:f4:24:93:98: power (1) () () () () () () 2005-10-05 10:29:00.1680 RandomPlay: received command power 1 2005-10-05 10:29:00.1684 RandomPlay: while in mode: track, from SoftSqueeze 2005-10-05 10:29:00.1691 Returning array: power (1) () () () () () () 2005-10-05 10:29:00.1842 Executing command f0:5a:f4:24:93:98: playlist (load) (itunesplaylist:80%E2%80%99s%20Music) () () () () () 2005-10-05 10:29:00.2985 RandomPlay: received command open file:///D:/mp3/Misc/A-HA%20-%20(11)%20Take%20on%20me%20(Techno%20mix).mp3 2005-10-05 10:29:00.2992 RandomPlay: while in mode: track, from SoftSqueeze 2005-10-05 10:29:00.3110 RandomPlay: received command playlist load_done 2005-10-05 10:29:00.3116 RandomPlay: while in mode: track, from SoftSqueeze 2005-10-05 10:29:00.4394 RandomPlay: received command playlist load itunesplaylist:80%E2%80%99s%20Music 2005-10-05 10:29:00.4400 RandomPlay: while in mode: track, from SoftSqueeze 2005-10-05 10:29:00.4408 Returning array: playlist (load) (itunesplaylist:80%E2%80%99s%20Music) () () () () () 2005-10-05 10:29:00.6305 RandomPlay: received command newsong 2005-10-05 10:29:00.6321 RandomPlay: while in mode: track, from SoftSqueeze
Random Mix should stop in any situation where the playlist is cleared or replaced. Tracks being added or deleted should not stop it. From what you're saying, I've missed a case where it should stop, so please feel free to fix this. I'm afraid I won't be able to do any more today, but will sort it tomorrow if it still needs doing.
I suppose then, that we should add "load", "play", "loadalbum", "playalbum"... or perhaps just on "playlist clear" which, could be called from every one of those case (except they currently just replicate the same set of code) I just wanted to be sure you didn't have a particalar reason for continuing on load or play. If you are ok with changes along those lines, I can certainly take care of it
As long as the playlist can still be modified without stopping the mix, I'm happy. Thanks, kdf. I really am going to bed now!
Just to clarify, I deliberately changed the plugin to allow the addition of tracks or whole albums without interrupting the mix. I'm a little bit nervous about loadalbum, but I don't know what it does and unfortunately don't have the time to check right now. In addition, load often occurs when tracks are added (doesn't it?), so that on its own shouldn't stop the mix.
loadalbum and playalbum are old style group load (no play) and play (load and start playing). Both commands clear the playlist. I'm not sure if anything actually uses them any anymore, but best to be safe. Anything that first clears the playlist should be safe to consider as not adding to an existing playlist.
committed to trunk at change 4558