Bugzilla – Bug 10533
need accessor to _pluginData not tied to sync groups
Last modified: 2009-07-31 10:33:54 UTC
Created attachment 4539 [details] patch providing clientPluginData() method The pluginData() method in Slim::Player::Client is intended to give 3rd party developers a way to stash runtime information in client objects, to help prevent memory leaks & make garbage collection easier than it would be with the old technique of class-scoped hash arrays using $client->id() as the key. But the pluginData() method is tied not to specific clients -- it's tied to sync groups (as of SVN change 12808). Some plugins need to associate information with specific players without regard to sync groups, and currently there is no way to do that with the recommended pluginData() technique -- so developers must continue to use class-scoped global hash arrays. This patch, which has NOT been tested much, provides a new method, clientPluginData(), whose usage is identical to pluginData() but which uses the client object specified by the caller, and pays no attention to sync groups (as pluginData() itself did prior to SVN change 12808) so existing code that uses plain pluginData() will continue to work.
Andy? I tend to favor migrating all the current usage to $client->master->pluginData as I think plugin authors will already be using pluginData eroneously for non streaming state. But either way I suggest we put something into 7.3.2 so Peter's plugin can be migrated...
Change 24510. I went with Triode's suggestion. $client->pluginData no longer calls master, and all existing uses of pluginData have been changed to $client->master->pluginData.
Peter: does this address your request?
Yes, this resolves my concerns very well, thank you!
Fixed - Closed Message (SC) This bug has been fixed in the 7.3.3 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Correction: SqueezeCenter version is 7.3.2
Reduce number of active targets for SC