<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 01/11/14 01:17, Mike Rice wrote:<br>
    </div>
    <blockquote
cite="mid:CAJ2rmDvj0dnui6B0wKUb9WFKq5Vae9fkhsnxw+x-eGGqK7JYpQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Over the years I've developed the bad habit of
        changing things in the database directly or using scripts to do
        it.  After the recent discussion about using an embedded
        database I decided to try to get rid of these scripts and
        refrain from editing the database.
        <div><br>
        </div>
        <div>So far I've replaced a recording_started bash script with a
          perl script using the bindings.  That went pretty well but I
          was only accessing data and not updating anything.  </div>
        <div><br>
        </div>
        <div>Next problem: I have channels that I need to toggle the
          visibility of at certain times of the year.  These are
          channels that show hockey part of the year and baseball other
          part.  Assuming I only subscribe to one and not the other I
          need them to go away for awhile.</div>
        <div><br>
        </div>
        <div>I assume this can be done manually with the channel editor
          but I don't normally have a keyboard attached and rather do it
          with a script.  Looks like I can do it with mythweb too.  A
          nice script I can run a few times a year would be easier to
          me.</div>
        <div><br>
        </div>
        <div>Anyone have a script to do this that doesn't modify the
          database directly?  Or can someone point me to an existing
          script that can change the attributes of a channel?  Or some
          info on how to do this in general?</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a>
<a class="moz-txt-link-freetext" href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a>
MythTV Forums: <a class="moz-txt-link-freetext" href="https://forum.mythtv.org">https://forum.mythtv.org</a>
</pre>
    </blockquote>
    I think the general approach would be to use Mythtv Services API.<br>
    See <a class="moz-txt-link-freetext" href="https://www.mythtv.org/wiki/Services_API">https://www.mythtv.org/wiki/Services_API</a><br>
    <br>
    In particular, to change the visible flag you could use Channel/UpdateDBChannel
    API<br>
    Note that the documentation on these API is sparse in some cases.<br>
    <br>
    Mike<br>
    <br>
  </body>
</html>