<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 10/30/21 4:45 PM, Ken Bass wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:891f658c-7240-2c9f-3f56-a34d07feaf8e@kenbass.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">On 10/30/2021 4:28 PM, Jim Abernathy
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:0338eb24-49cf-4a3e-9374-9359956ba72b@gmail.com">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <p><br>
        </p>
        <div class="moz-cite-prefix">On 10/30/21 12:29 PM, Ken Bass
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:6f3f662d-60af-ac2c-8aa5-247084a1ba2d@kenbass.com">
          <meta http-equiv="content-type" content="text/html;
            charset=UTF-8">
          <font size="+1">I have what appears to be a very simple
            request. How do I 'move' an existing recording from one
            recording group to another? <br>
            <br>
            The easiest would be if this could be accomplished via
            mythweb...a simple dropdown for the Recording Group.</font></blockquote>
        <p><br>
        </p>
        <p><font size="+1">If I understand what you want to do it is an
            option in mythfrontend. right arrow on the recording you
            want to move and change the Storage Group -> Change
            Recording Group.</font></p>
      </blockquote>
      <p><br>
      </p>
      <p><font size="+1">Correct, that is in the mythfrontend, however I
          use a Kodi frontend and even with mythfrontend it is really
          time consuming (especially if you try to perform mass changes
          using playlist option). That is why I am looking for an API
          method to do this.</font><br>
      </p>
      <br>
    </blockquote>
    <p>I have been pondering whether to add an API to change the
      recording group. I need to add that capability to leanfront. I
      will probably get to it sometime. In the meantime what I do
      currently to change recording group in bash is this (see below).
      It is not recommended by the developers because database changes
      could invalidate this.<br>
    </p>
    <p>mysqlcmd="mysql --user=$DBUserName --password=$DBPassword
      --host=$DBHostName $DBName"<br>
      ...<br>
      if [[ "$NEW_RECGROUP" == Deleted ]] ; then<br>
          sql_extra=", autoexpire = 9999 "<br>
      else<br>
          sql_extra=<br>
      fi<br>
      set -- `echo "select recgroupid from recgroups where recgroup =
      '$NEW_RECGROUP';" | \<br>
          $mysqlcmd | tail -1`<br>
      recgroupid=$1<br>
      echo "update recorded set recgroup = '$NEW_RECGROUP', <br>
            recgroupid = $recgroupid $sql_extra <br>
            where basename = '$basename';" | \<br>
          $mysqlcmd<br>
    </p>
    <p>basename is the recording file name. You could also use other
      parameters for the where clause but be careful in case it selects
      more records than you expect. You could change the rec group of an
      entire series by using the title in the where clause.</p>
    <p>If you use invalid values for recording group bad things may
      happen.</p>
    <p>Peter<br>
    </p>
  </body>
</html>