[mythtv] Service API call which returns MythTV Version?

Bill Meek keemllib at gmail.com
Sun Dec 6 15:34:36 UTC 2015


On 12/05/2015 09:24 PM, Robert Kulagowski wrote:
> The Services API states that there are changes between 0.27 and 0.28.
>
> https://www.mythtv.org/wiki/API_parameters_0.28
>
> Is there a Service API call which returns the MythTV version number so
> that the appropriate request can be made?

I know this works in 0.28-pre and appears in the code for 0.27:

     <yourfrontend>:6547/Frontend/GetStatus

The downside it that the frontend must be running, which is likely less
often than the backend.

If the default XML is used, it returns:
<FrontendStatus version="1.1" serializerVersion="1.1"><Name>yourfrontend</Name><Version>v0.28-pre-3180-gca36acd</Version>...

Or, for the backend, you could use <backend>:6544/Myth/GetSettingList
and look for DBSchemaVer. GetSetting has changed between 0.27 and
0.28-pre (code wise.)

https://code.mythtv.org/cgit/mythtv/tree/mythtv/programs/mythbackend/services/myth.cpp?h=fixes%2F0.27#n513
https://code.mythtv.org/cgit/mythtv/tree/mythtv/programs/mythbackend/services/myth.cpp#n595

In the 0.28, you can't use GetSetting and a NULL hostname, which is
what you want for DBSchemaVer. But GetSettingList with no HostName
will return all of the NULL settings.

GetSettingList doesn't exist in 0.27 as you probably spotted in Phil's
pages. You'd use GetSetting with no HostName parameter, but I only
looked at the code for it.

-- 
Bill


More information about the mythtv-dev mailing list