'type' => 'xpath',
'xpath' => "//Status/Encoders/Encoder",
'protocol_version' => [ ">= 58" ],
- 'attrs' => [ qw/hostname id state connected/ ],
- 'template' => "__hostname__ (__id__) - __state____connected__",
+ 'attrs' => [ qw/hostname id state devlabel connected/ ],
+ 'template' => "__hostname__ (__id____devtype__) - __state____connected__",
'rewrite' => {
'/connected/' => { '1' => '', '0' => "${warning}(Disconnected)${normal}" },
'/state/' => {
'filter' => {
'state' => sub { return $c->{'encoder_skip_idle'} && $_[0] == 0 },
},
+ 'subs' => {
+ 'devtype' => sub {
+ if ($_[0]->{'devlabel'} =~ /\[ (.+) :/) { ", $1" }
+ else { '' }
+ },
+ },
},
# What programs (if any) are being recorded right now?