Bugzilla – Bug 3105
Pressing ADD in Live Music Archive plugin does wrong thing
Last modified: 2008-12-15 12:15:33 UTC
It should add the tracks to the end of the playlist, rather than removing the currently playing song. (Should be back-ported to trunk plugin.)
XMLBrowser is not customized for SN, so I'm calling this a SlimServer bug.
sideline note on this, looks like only play and add are supported, while insert (via add.hold) seems to be missing. the code from XMLBRowser.pm does look to be calling the right command ($client->execute([ 'playlist', $action, $url, $title ]);), so I wonder if this is perhaps pointing to a problem in the legacy command handler. obviously this is using "play" or "add" as the $action, since the newer "loadtracks" and "addtracks" requires a datastore object. If you have yet to test this in slimserver (watch with d_command debug enabled). It does seem to call the right button function, but as you say deletes the current song. This would seem to indicate that the server is acting on the "add" button as if it were in the "playlist" mode, which does delete the current track. Possible that the mode change is happening too fast, or the command dispatcher is mapping to the wrong mode somehow.
Looks like the params are getting lost or are somehow not properly provided when into the sublevels of LMA, onAdd is not used. Instead INPUT.Choice seems to be using 'passback'
Created attachment 1154 [details] add a missing 'onAdd' to gotOPML however, what is then missing is a showBriefly feedback to say the item is added. It looks like nothing happens, but the item does appear to be getting added properly. I can continue to look at that, and I noticed that the XMLBrowser should have some work on the params hashes, wrapping the keys in '' is more slimserver style is it not? Attached patch fixes the style and the function, still need to track down the missing showBriefly.
Nice work, thanks for looking into this. IMO putting quotes around hash keys is unnecessary unless there's a space in the key for some reason. But to each their own. :)
I just follow it becuase it has been what I've seen so far in slimserver code (also stands out nicely when syntax highlighting). I also seem to remember something about a problem with reserved words getting interpreted unless eclosed in single quotes. I can't for the life of me recall which module was involved, or it might have been a plugin. Up to you guys to decide on style. The key part of the patch is the addition of onAdd in the gotOPML. still haven't chased down the missing feedback
Created attachment 1155 [details] add feedback for audio files adds the showBriefly feedback when adding or playing audio. I've noticed that INPUT.Choice doesn't support add.hold, or insert. I'm not sure if that is deliberate or not.
That patch works for me, I'd say go ahead and commit it.
done at trunk change 6481. Marking for SN until it is ported over.
Marking fixed as SN uses the trunk version. Thanks!
This bug has been fixed in the latest release of SqueezeNetwork! If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.