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

Hika van den Hoven hikavdh at gmail.com
Wed Oct 15 22:45:52 UTC 2014


Hoi Bill,

Thursday, October 16, 2014, 12:38:02 AM, you wrote:

> On 10/15/2014 05:04 PM, Mike Perkins wrote:
>> On 15/10/14 21:53, Bill Meek wrote:
> ...
>>> We must be talking about different things. The --host argument
>>> is used to form the URL and should be the name of the host, as
>>> in, the name in /etc/hosts. Which *may* be the same as the MythTV
>>> hostname in its DB (used as a profile name.)
>>>
>>>
>> You need to be careful using the local hostname. This may be just a host name or a fully-qualified domain name (including the host), neither of
>> which may be how the mythtv front or back end is identified in the database!
>>

> Agreed. That's what I meant by the *may* part. There is a Python binding* that
> will return the correct value, but I was writing a solution without using them
> The proper Services API endpoint would be: hostname:6544/Myth/GetHostName .

> Where the hostname ^^^ above refers to the one you'd use when typing
> something like ssh hostname, and not the one used my MythTV as a profile
> name.

OK, your url returns <String>GentooServer</String> so I'll ad a query
just in case. But how to I retrieve the string? Just with:
response.findtext('String')? So then it becomes:

URL0 = 'http://{}:6544//Myth/GetHostName'.format(args.host)
response = ET.parse(urlopen(URL0))
URL1 = 'http://{}:6544/Capture/GetCaptureCardList?HostName={}' \
        .format(args.host, response.findtext('String'))

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