sto wrote:
> Thanks for the reply.
>
> I've using the plugin Really Prevent System Standby to send a WOL to
> keep my server awake. For some reason it only stops sending the WOL cmd
> when the player is off, It thinks the player isn't idle when it's not
> playing but on.
>
> How does Really Prevent System Standby or for that matter
> SvrPowerCOntrol work out when the player is idle ?
>
> Thanks
This is the ReallyPreventStandby code that check to see if a player is
busy:
Code:
--------------------
sub _playersBusy {
my $bCheckPower = $g{prefs}->{bCheckPower};
for my $client (Slim::Player::Client::clients()) {
if ($bCheckPower && $client->power()) {
$g{log}->is_debug && $g{log}->debug("Player " .
$client->name() . " is powered " . ($client->power() ? "on" : "off") . "...");
return 1;
}
if ( $client->isUpgrading() || $client->isPlaying() ) {
$g{log}->is_debug && $g{log}->debug("Player " .
$client->name() . " is busy...");
return 1;
}
}
return 0;
}
--------------------
You an see that there is an option to always return "busy" if the player
is "powered on". You should view the settings page to make sure that
option isn't checked.
Contrast this with the current PreventStandby's "busy" check:
Code:
--------------------
sub _playersBusy {
my $checkpower = $prefs->get('checkpower');
for my $client (Slim::Player::Client::clients()) {
if ($checkpower && $client->power()) {
main::DEBUGLOG && $log->is_debug && $log->debug("Player
" . $client->name() . " is powered " . ($client->power() ? "on" : "off") .
"...");
return 1;
}
if ( $client->isUpgrading() || $client->isPlaying() ||
(Time::HiRes::time() - $client->lastActivityTime <= INTERVAL) ) {
main::DEBUGLOG && $log->is_debug && $log->debug("Player
" . $client->name() . " is busy...");
return 1;
}
}
return 0;
}
--------------------
You can see Micheal's addition of 'lastActivityTime' to the logic.
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins