[mythtv] [mythtv-commits] mythtv/master commit: 5bf377b55 by Robert McNamara (rmcnamara)

David Blain mythtv at theblains.net
Sun Apr 10 14:16:11 UTC 2011


> Log:
> 
> API: Add the ability to create and update channels.
> 
> Obviously, these are POST only.  Still, for creation of basic channels
(not
> creation of multiplexes, though creation of channels on existing
> multiplexes would work) this does the trick.
> 
> http://BackendServerIP:6544/Channel/CreateDBChannel?MplexID=950&Sou
> rceID=3&ChannelID=9743&CallSign=CHNL&ChannelName=My Great
> Channel&ChannelNumber=9743&ServiceID=3&ATSCMajorChannel=120&ATS
> CMinorChannel=0&UseEIT=1&visible=1&FrequencyID=9743&Icon=path-to-
> icon.png&Format=Default&XMLTVID=12345&DefaultAuthority=
> 
> To update a channel, one would do the same as above, but substitute
> UpdateDBChannel as the URL.  See the wsdl for the Channel service for all
> the parameters and their types.
> 
> To be used soon for the HTML setup channel editor.
> 
> NB, this API should really not be abused-- you shouldn't use it to
> add/update channels unless you really, really know what you are doing.
> We're angling to make adding and editing of channels insanely easy with
> the backend webserver interface, for which we need this API, but be a
sport
> and don't break your setup.  ;)
> 

Robert,

I haven't looked at ChannelUtil to see what edits are being done, but wanted
to remind you that calls to these or any method without all the parameters
will work.  The missing parameters will be assigned default values based on
the type.

So if an update call is made with only a channel ID, it will in effect
update all columns with 0's and empty strings.

Let me know if you want to discuss possibly changing this default behavior
or maybe making it optional per method.

David. 




More information about the mythtv-dev mailing list