Architecture decisions ...
Since we don't get rid of SCPowerTool, we might as well move the
registry action there. That would keep the Perl code system independent.
You could for example introduce another flag ---lightsout-, so I would
just have to change -scpowertool.exe --hibernate --log- to
-scpowertool.exe --hibernate --lightsout --log- in order to use
LightsOut for controlling the server.
In the watchdog script, I would introduce a new -szBusy_cmd- which
would be something like -scpowertool.exe --busy --lightsout --log- and
be executed somewhere in this -if- Block:
Code:
--------------------
#$g{log}->debug("Checking to see if scanner is running & if players are
idle..");
if ( Plugins::SrvrPowerCtrl::Block::IsBlocked() ||
Plugins::SrvrPowerCtrl::Util::AnyPlayersPlaying() ||
Plugins::SrvrPowerCtrl::Util::AnyPlayersUpdating() ||
Slim::Music::Import->stillScanning() ) {
$g{log}->debug("Not idle condition..");
#Not idle...reset the timer to check again..
$nIdlePlayersTimeCount = 0;
return 0;
}
--------------------
This is approximately what Alex did with the system-specific code
externalized.
I am not sure whether you would also want to make the rate at which the
-szBusy_cmd- is performed configurable, too, but apart from that I
believe that you can feed almost any watchdog after the command has been
introduced.
gharris999;429267 Wrote:
> If we were to go with just the "is idle" message via the registry, that
> should avoid the sort of system deadlock as you describe. Presumably,
> LightsOut has the responsibility of clearing the "is idle" flag.This has
> somehow slipped under my attention radar. I don't think that
LightsOut changes the flag at all, save when the configuration is
modified by the user. I will test the assumption as soon as I have it
installed.
--
mvordeme
'last.fm' (http://www.last.fm/user/mvordeme) | scaleo home server 2105 |
squeezecenter 7.3.2 | server power control 7.3 |
squeezebox boom & duet | rotel rsp-1066 | rotel rmb-100 | phonar p-5
------------------------------------------------------------------------
mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins