[mythtv] Service API call which returns MythTV Version?

Bill Meek keemllib at gmail.com
Mon Dec 7 05:01:42 UTC 2015


On 12/06/2015 10:19 PM, Robert Kulagowski wrote:
> On Sun, Dec 6, 2015 at 9:34 AM, Bill Meek <keemllib at gmail.com> wrote:
>> 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?
>
> Yeesh. I've managed to find the version number
> ...
> But VideoSourceList is a weird place to find it.

I should have mentioned that the version is always available
in the HTTP Server header, for example:

     MythTV/0.28-pre-3094-g349d3a4 Linux/3.13.0-66-generic UPnP/1.0

and

     Linux 3.13.0-65-generic, UPnP/1.0, MythTV 0.27.20150622-1

...

>
> https://www.mythtv.org/wiki/Channel_Service#UpdateDBChannel
>
> States that it's a POST, but which fields are being used by the
> backend to make a match? If I need to update something like the
> callsign for chanid 1010 then which parameters are used to single out
> the one matching station?

ChannelID.

It calls ChannelUtil::UpdateChannel:

     https://code.mythtv.org/cgit/mythtv/tree/mythtv/libs/libmythtv/channelutil.cpp#n1559

and down on line 1590 is the WHERE chanid= line. Also note 1591-6 for fields
that won't be updated if they're not passed. Makes life a tad simpler.
Be careful not to use the IconURL in the Get to set the Icon in the
Update.

Another handy POST endpoint: Myth/BackupDatabase

-- 
Bill


More information about the mythtv-dev mailing list