[mythtv] Service API for updating videosource is removing existing data?

John P Poet jppoet at gmail.com
Wed Dec 9 06:26:12 UTC 2015


On Tue, Dec 8, 2015 at 9:47 PM Bill Meek <keemllib at gmail.com> wrote:

> On 12/08/2015 10:23 PM, Robert Kulagowski wrote:
> > The data for sourceID 6 has been reset to default values? Is that the
> > intended effect? That updating a single field (and not re-specifying
> > data for all the other fields, which were_just_  created using the
> > AddVideosource method) is means that the record is going to get wiped?
> > Because in that case it's probably easier to avoid updates and just do
> > a delete / add?
>
> That is how it's written (can't speak for the intent.) UpdateVideoSource
> calls:
> https://code.mythtv.org/cgit/mythtv/tree/mythtv/libs/libmythtv/sourceutil.cpp#n402
> and you can see that the SQL touches every field. If any are blank, then
> that's what gets added (or default values.)
>
> It looks like this (and some other endpoints) expect the user to get the
> old data 1st. In this case calling GetVideoSource.
>
> --
> Bill
>

Bill and Robert,

While I don't have much experience using the "services API" myself, I know
that we would like to improve it, and flush it out.  If you have any
features or modification you would like to see, please let us know.
Patches would be appreciated but even just a description of how it could
work better, would be useful.

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20151209/c32bacd2/attachment.html>


More information about the mythtv-dev mailing list