[mythtv] Services API for ChannelServices / Video Source

Gary Buhrmaster gary.buhrmaster at gmail.com
Fri Nov 1 16:06:55 UTC 2019


On Fri, Nov 1, 2019 at 2:49 PM David Engel <david at istwok.net> wrote:
>
> On Fri, Nov 01, 2019 at 08:54:18AM +0000, Stuart Morgan wrote:

> > The services API was intended to retain backwards compatibility at all times,

Thanks for confirming backwards compatibility is the
intended goal.  My concern was that it appeared
that in this case (based on the words in the email;
I have not personally tested) that this was not
properly implemented in this case, with new
(required) parameters which would (especially in
the case of updates) reset values not provided
by existing callers.  If my understanding in not
correct, my apologies.

> Also, another failing of the current API is the inability to pass an
> "unspecified" indication to the endpoint.

I keep running into this one and the one where providing
a JSON None does not result in a DB NULL value (where
the value NULL is dealt with differently in the code base
(than something like a 0 or empty string) so one must get
a NULL in there, but at least in the cases I care about,
there was no way to do so).

As for backward compatibility, for the Update methods,
(I don't know how easy it is to implement), I would
prefer that one should only update the provided values,
not a complete row replacement (could be done by very
selective DB updates of the provided entities, or
retrieving the existing values, merging the provided
input, and then doing the update).  I have had to jump
through some hoops to do the equivalent (and even
have a couple of cases of version specific checks for
what to do and how to do it for some changes in the
services API for some more obscure use cases).

Anyway, thanks for accepting the input (even though
it appears I have opened the can of worms).


More information about the mythtv-dev mailing list