[mythtv-users] How to check if a tuner is in use

Hika van den Hoven hikavdh at gmail.com
Wed Oct 15 20:20:30 UTC 2014


Hoi Hika,

Wednesday, October 15, 2014, 10:10:34 PM, you wrote:

> Hoi Bill,


>>> URL='http://{}:6544/Dvr/GetEncoderList'.format(host)

>> Try the URL developed above (e.g. with your hostname
>> where {} is), from a browser to see everything that's
>> returned. And there's a lot. E.g. <DisplayName>ATSC-0</DisplayName>
>> could be used assuming your cards have unique names.

>>> try:
>>>          request = 'SELECT `cardid` FROM `capturecard` WHERE `videodevice` = "%s" AND `hostname` = "%s"' \
>>>                                  % (card, host)
>>>          c = DB.cursor()
>>>          c.execute(request)
>>>          if c.rowcount == 1:
>>>                  for row in c.fetchall():
>>>                          cardid = str(row[0])

>> One intent of the Services API is to avoid direct access to the
>> MythTV DB. I thought that was the intent of the bindings too.
>> I'd strive to get rid of the code above.

> I'm running 0.27.3 from gentoo, but all I get per encoder on that page
> is:
>     <Id>1</Id>
>     <HostName>GentooServer</HostName>
>     <Local>true</Local>
>     <Connected>true</Connected>
>     <State>7</State>
>     <SleepStatus>8</SleepStatus>
>     <LowOnFreeSpace>false</LowOnFreeSpace>
> and then a lot of info about the recording but no 'Inputs/Input'? So I
> see no other way to retrieve it.

Are there maybe other pages? I tried: GentooServer:6544/Dvr/GetInputList

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list