bklaas;335980 Wrote: > Given that structure, my question to you is this-- how can I query the > mixer through Slim::Music::Import->importers to know whether a > particular type of object is not available for mixing? Is that even > possible? > I think we have two problems here:
Problem 1: When the "base" element indicates that the "contextmenu" JSON command should be used on play-hold, the "contextmenu" element returns all mixers available, not just all mixers available on the selected object. I believe the problem here is in Slim::Control::Queries::contextMenuQuery, which adds all mixers to the result but it should really just add the mixers where the call to $mixer->mixable($obj) returns true. Changing this shouldn't affect the performance at all, but you will need to handle the case where no mixers is available so the user doesn't just get an empty screen in this case. The reason it doesn't affect performance is that the "contextmenu" call is issued for the selected item after the user has pushed play-hold and not initially when the list of items is retrieved. Problem 2: This is the one I think you refer to which is about the decision if an intermediate menu should be shown when add-hold is pressed or if it should execute the mixer directly. I'm not sure this is a major problem because the only result with the current behavior is that it might show the intermediate menu in cases where only a single mixer is available for that particular object. To solve this you will have to check each item in the list and decide what to use in the base item based on the maximum number of mixers available on any item. This check is today handled in the call to Slim::Control::Queries::_mixerItemHandler, if the "$mixer->mixable($obj)" call in that function return true the object is mixable for that type of item. However, the "base" object isn't really the worse problem. To avoid making this more complex than necessary, I would suggest that you fix problem 1 while problem 2 might be acceptable as it works today. -- erland Erland Isaksson 'My homepage' (http://erland.isaksson.info) 'My download page' (http://erland.isaksson.info/download) (Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse, Custom Scan, Custom Skip, Multi Library and Database Query plugins' (http://wiki.erland.isaksson.info/index.php/Category:SlimServer)) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=50744 _______________________________________________ jive mailing list [email protected] http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive
