[mythtv-users] MythTV Status in your MOTD
Marc Tousignant
drayson at net1plus.com
Tue Mar 31 03:11:49 UTC 2009
Seems I found the fix myself. Google search on the states showed me exactly
where to look in the source.
Here is the updated code for .22
Do not change this if you are still on .21
{
'name' => 'Encoders',
'type' => 'xpath',
'xpath' => "//Status/Encoders/Encoder",
'attrs' => [ qw/hostname id state connected/ ],
'template' => "__hostname__ (__id__) - __state____connected__",
'rewrite' => {
'/connected/' => { '1' => '', '0' => "${warning}
(Disconnected)${normal}" },
'/state/' => {
'^-1$' => "${warning}Error${normal}",
'^0$' => "${safe}Idle${normal}",
'^1$' => "${warning}Watching LiveTV${normal}",
'^2$' => "${warning}Watching Pre-recorded${normal}",
'^3$' => "${warning}Watching DVD${normal}",
'^4$' => "${warning}Watching Video${normal}",
'^5$' => "${warning}Watching Recording${normal}",
'^6$' => "${warning}Recording${normal}" },
}
Marc
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Marc Tousignant
Sent: Monday, March 30, 2009 10:23 PM
To: 'Discussion about mythtv'
Subject: [mythtv-users] MythTV Status in your MOTD
Anyone who has been around for a while remember the MythTV Status in the
MOTD script by Andrew Ruthven?
http://www.etc.gen.nz/projects/mythtv/mythtv-status.html
Since I updated to .22 the other day I have noticed that while it works
still there is a slight error.
The encoder status messages are wrong.
Here is the bit of code in the latest release by Andrew. I have sent him a
message already but wanted to know if someone could enlighten me on the new
states.
{
'name' => 'Encoders',
'type' => 'xpath',
'xpath' => "//Status/Encoders/Encoder",
'attrs' => [ qw/hostname id state connected/ ],
'template' => "__hostname__ (__id__) - __state____connected__",
'rewrite' => {
'/connected/' => { '1' => '', '0' => ' (Disconnected)' },
'/state/' => {
'^0$' => "${safe}Idle${normal}",
'^1$' => "${warning}Watching LiveTV${normal}",
'^2$' => "${warning}Watching Pre-recorded${normal}",
'^3$' => "${warning}Watching Recording${normal}",
'^4$' => "${warning}Recording${normal}" },
}
I already know that 0 is still Idle, 1 is still Watching LiveTV, and that 6
is the new Recording. But what are 2 3 4 and 5?
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090330/7cdfb353/attachment.htm>
More information about the mythtv-users
mailing list