[mythtv] Services API : inputgroup

David Engel david at istwok.net
Thu May 26 19:02:50 UTC 2022


On Thu, May 26, 2022 at 11:46:52AM -0600, John P Poet wrote:
> On Thu, May 26, 2022 at 10:02 AM David Engel <david at istwok.net> wrote:
> 
> > On Wed, May 25, 2022 at 07:22:42PM -0600, John P Poet wrote:
> > > Hi Peter, et al.,
> > >
> > > Is there a Services API endpoint for managing the inputgroup table? I
> > > didn't see one but figured I would ask before working on adding it.
> > >
> > > I have not been that active lately, so if there is a new and improved way
> > > of writing Services API stuff, please let me know. Otherwise, I will
> > follow
> > > https://www.mythtv.org/wiki/Services_API_Development_Guide
> >
> > I'll defer to Peter, Stuart and Paul on the v2 API framework.  IMO,
> > though, the v1 API is severely lacking when it comes to tuners and
> > need not be kept as is in v2.
> >
> > As for input groups, I don't see any reason to allow direct access to
> > the table per se through the API.  Instead, I think there should
> > probably only be services like AddCaptureCardToGroup and
> > RemoveCaptureCardFromGroup where the group is identified by name only.
> >
> > David
> >
> 
> Yes, I agree. There would also need to be AddGroup and RemoveGroup and
> GetGroups.

I don't know that these are strictly needed.  GetGroups could be
synthesized by simply getting all tuners and seeing what groups are in
use.  AddGroup and RemoveGroup aren't really needed either as a group
iplicitly is created when it's added to a tuner and deleted when it's
removed from the last card using it.

> If you have other suggestions for how the tuner API should be structured,
> let me know. I still don't have a lot of free time right now, but plan on
> starting to work some of this stuff.

Look at the *Schedule functions for adding business rules.  One thing
those functions don't currently support and should be remedied and not
copied is optional parameters on updates.  IOW, if a parameter is not
specified in an "update", it should default to the current value of
the underlying object.

One area of tuner configuration that I don't have a good idea of how
to handle yet is DiSEqC.  I'm not keen on having an API exposing the
entire tree but I also don't have any better idea either.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list