[mythtv-users] Converting scripts to not use the database directly

Mike Rice mikerice1969 at gmail.com
Sat Nov 1 12:43:36 UTC 2014


On Sat, Nov 1, 2014 at 3:41 AM, Mike Bibbings <mike.bibbings at gmail.com>
wrote:
>
> I think the general approach would be to use Mythtv Services API.
> See https://www.mythtv.org/wiki/Services_API
>
> In particular, to change the visible flag you could use
> Channel/UpdateDBChannel API
> Note that the documentation on these API is sparse in some cases.
>

I did find those last night and started looking into it.  I can use perl to
grab the channel info:

use LWP::Simple;
use XML::Simple;
use Data::Dumper;

my $parser = new XML::Simple;
my $url = "http://192.168.1.26:6544/Channel/"
                    . "GetChannelInfoList?SourceID=5&StartIndex=1&Count=1";
my $content = get $url;
my $data = $parser->XMLin($content);
print Dumper($data);

But I haven't found any examples how to update with UpdateDBChannel.  Maybe
this is obvious to someone used to using services like this?  I'll probably
eventually figure it out but any help would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20141101/a9b9f229/attachment.html>


More information about the mythtv-users mailing list