Index: server/Slim/Player/Client.pm =================================================================== --- server/Slim/Player/Client.pm (revision 24399) +++ server/Slim/Player/Client.pm (working copy) @@ -1235,9 +1235,30 @@ $client->_currentPlaylistChangeTime(@_); } +# clientPluginData is tied to the specific requested client +sub clientPluginData { + my ( $client, $key, $value ) = @_; + + my $namespace; + + # if called from a plugin, we automatically use the plugin's namespace for keys + my $package; + if ( main::SLIM_SERVICE ) { + # pluginData is called from SNClient, need to increase caller stack + $package = caller(1); + } + else { + $package = caller(0); + } + + return &getPluginData( $client, $key, $value, $namespace, $package); +} + +# pluginData is tied to the *sync group* of the requested client sub pluginData { my ( $client, $key, $value ) = @_; - + + # get the master player for the sync group $client = $client->master(); my $namespace; @@ -1251,7 +1272,13 @@ else { $package = caller(0); } + + return &getPluginData( $client, $key, $value, $namespace, $package); +} +sub getPluginData { + my ( $client, $key, $value, $namespace, $package) = @_; + if ( $package =~ /^(?:Slim::Plugin|Plugins)::(\w+)/ ) { $namespace = $1; }