PDA

View Full Version : Execute plugin



Patrick Dixon
2005-02-04, 09:49
Hi Kevin

I still have a few problems with the plugin:

1) In 'selectFunctions' 'play' the line:
system("\'$runScript\'");
doesn't work for me, so I've replaced it with
system $runScript;
which does.

2) In 'commandCallback' the lines like
$runScript = Slim::Utils::Prefs::clientGet($client, 'script',0); (etc)
don't work for me, so I've replaced them with
$runScript = Slim::Utils::Prefs::clientGet($client, 'script'.0); (etc)
which do.

3) The web interface selected scripts don't seem to agree with what it says on the display.

(I have no idea what I'm doing here though ...)


-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com]On Behalf Of kdf
Sent: 04 February 2005 05:45
To: Slim Devices Discussion
Subject: [slim] Execute plugin



Hi Patrick,

I've taken a closer look at the Execute plugin. it seems that the line endings
were also a mess. I've resynced with my cvs copy and posted a new version
online. i've fixed getDisplayName so that it should work with both 5.4 and 6.0
builds, and taken the quotes off $runscript.

I only managed a bit of time to test, but it does seem to be trapping events
properly under windows. the script for power is set to run at power ON and not
OFF.

let me know if you need anything else.

cheers,
kdf

kdf
2005-02-04, 10:23
Quoting Patrick Dixon <patrickdixon (AT) btinternet (DOT) com>:

> Hi Kevin
>
> I still have a few problems with the plugin:
>
> 1) In 'selectFunctions' 'play' the line:
> system("\'$runScript\'");
> doesn't work for me, so I've replaced it with
> system $runScript;
> which does.

The new one i posted last night shouldn't have had those. If you havent
downloaded v1.4, please do so. The line endings were totally wrong, thus can
tend to have unpredictable results.


> 2) In 'commandCallback' the lines like
> $runScript = Slim::Utils::Prefs::clientGet($client, 'script',0); (etc)
> don't work for me, so I've replaced them with
> $runScript = Slim::Utils::Prefs::clientGet($client, 'script'.0); (etc)
> which do.

good catch.

> 3) The web interface selected scripts don't seem to agree with what it says
> on the display.
>

can you tell me what the differences are?
>
-kdf

kdf
2005-02-04, 10:34
Quoting Patrick Dixon <patrickdixon (AT) btinternet (DOT) com>:


>
> 3) The web interface selected scripts don't seem to agree with what it says
> on the display.

I think I do know what you mean here after all. At the time this was written
(almost 2 years ago, and oddly has barely ever been even glanced at since)
plugins were ONLY a server wide feature. As such, the web interface can only
provide a default server-wide set. If you set a player script, that will
override for any events triggered by that player. Only recently has it been
possible to add plugin web interface per player, like what you see with the
alarm plugin.

-kdf