gharris999;322268 Wrote:
> Mavit: any clue as to how to put back the default sleep button behavior
> if the user unchecks the 'handle sleep button' setting? (Short of
> restarting the server, that is?)
>
> I'm managed to kludge a fix to this by just duplicating the default
> code from Slim::Buttons::Common in a new sub in the plugin. I assume
> there is a much, much more elegant way to do that.
>
> I tried $gfuncDefSleepBtn = Slim::Buttons::Common::getFunction(
> $client, 'sleep'); ..but that didn't work at all.
>
> Any ideas?
Slim::Player::Client::clients returns undefined, presumably because
clients haven't been initialised yet, so you have nothing to pass to
Slim::Buttons::Common::getFunction. The following works, however:
Code:
--------------------
$gfuncDefSleepBtn = $Slim::Buttons::Common::functions{'sleep'};
--------------------
--
mavit
------------------------------------------------------------------------
mavit's Profile: http://forums.slimdevices.com/member.php?userid=10203
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins