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

Bill Meek keemllib at gmail.com
Wed Dec 9 04:46:23 UTC 2015


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


More information about the mythtv-dev mailing list