[mythtv-users] How to check if a tuner is in use
Bill Meek
keemllib at gmail.com
Mon Oct 13 20:52:13 UTC 2014
On 10/13/2014 03:35 PM, Daryl McDonald wrote:
...
> I see this in FE >information center >system status >tuner status
> Your needs must be different or more complex, I assume.
It's just a template, you can remove as much as you like,
for example replace the headings and detail with just:
for element in response.findall('Encoders/Encoder'):
if element.findtext('Id') == args.tuner and element.findtext('State') != '0':
print 'Tuner {0} is unavailable'.format(args.tuner)
break
or return an exit code like 1 for busy and 0 for available etc
(no text output at all.)
Add a tuner argument so you can call it with --tuner 2:
parser.add_argument('--tuner', type=str, required=True, metavar='<#>',
help='tuner number')
If memory serves, the status doesn't exist in the DB, only
in memory.
--
Bill
More information about the mythtv-users
mailing list