Peter & Epoch: pardon me if I don't quote your points exactly. I'll try to wade through my thoughts here while the caffeine slowly makes it's way across the blood/brain barrier.
It wasn't my intention to duplicate Peter's KidsPlay functionality. I should have known better and kept myself informed on his work in this area. What I was after, really, was to follow up on Danco's desire for custom menu entries and Epoch1970's idea of many months ago for a plugin that could process CLI commands embedded in a playlist (which is a brilliant idea.) Allowing cli requests to be valid 'commands' store-able in SrvrPowerCtrl's prefs also made sense to me in light of the switch in 7.4.x to the 'Restart Squeezebox Server' service restart function now being initiated via a cli request rather than an external script. Anyway, this was supposed to be my first baby steps in that direction. I was hoping that my cli processing code could form the basis for a future plugin that would explore Epoch's cli-requests-in-playlists idea. It sounds like Peter's code in KidsPlay might be better suited to this. My 'cli://' parsing code is a very dumbed-down version of Slim::Plugin::CLI::Plugin::cli_process(). To make my facility 'macro compatible' with KidsPlay, I'd need to duplicate most all of the logic in cli_process()...that or blatantly plagiarize Peter's code (and not for the first time!) Since Peter is so graciously offering this, perhaps this is the tack I should take. In principle, both the 'macro compatibility' and 'easy player names' features appeal to me. My inner lazy programmer is being resistant only because it's worried about the number of changes needed to my underlying code in order to support this. I'll hack away today at trying to keep track of the originating client with command requests and see just how daunting a task this is going to be. Re '&&' vs ';' as separator: I picked '&&' simply because it's the conventional in-line command separator in the windows script world...ignoring the fact that many people will see this as a Boolean operator. I was sure that SBS's cli processor would never want to touch anything so ugly. If you're certain that ';' isn't used by SBS's cli anywhere, I'll be glad to make the change. My code certainly isn't testing the success or failure of any particular command before moving on to the next. Re ':' in the first word of a CLI command: of course, MAC addresses include ':'s. I'm using ($client, $arrayRef) = Slim::Control::Stdio::string_to_array($cmd); to create the client and array ref of the cli command. This makes the processing very easy...if no mac address prefaces the cli request, $client remains undef. Moving towards player id aliases means forgoing this simplicity. Then again, looking at string_to_array()'s code shows it to be simplicity itself, itself. Anyway, thank you both very much for the feedback. You've given me much to think about. PS: Sarah Palin voice cues: a number of years ago, I got Frances McDormand to sign my copy of 'Fargo' when she was filming scenes from 'North Country' in New Mexico (ironic, eh?). If what you're after are voice cues in a boreal patois, wouldn't you rather have Marge Gunderson's voice than Sarah Palin's? Palin's voice is known to cause spontaneous cerebral vascular accidents in listeners. -- gharris999 ------------------------------------------------------------------------ gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115 View this thread: http://forums.slimdevices.com/showthread.php?t=48521 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
