[mythtv] PATCH for MythWeb to allow unsuppressing a recording

Panix mythtv at cox-internet.com
Wed May 14 13:18:51 EDT 2003


I originally had this function added when i made the conflict resolution
changes to MythWeb, but chose not to include it because there was not
similar functionality in Mythfrontend and I wanted the same options to be
available in both interfaces.
----- Original Message -----
From: <jasonmiller at micron.com>
To: <mythtv-dev at snowman.net>
Sent: Wednesday, May 14, 2003 11:39 AM
Subject: [mythtv] PATCH for MythWeb to allow unsuppressing a recording


> This patch adds an Activate button next to suppressed (Yellow) programs in
the MythWeb FixConflicts page.  All it does is delete the entry for that
program from oldrecorded which should have the effect of allowing that
program to either be recorded or be in conflict in which case it can then be
resolved the normal way.  If there is a gotcha in doing it this way let me
know :)
>
>
> Index: mythweb/conflicts.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/conflicts.php,v
> retrieving revision 1.4
> diff -u -r1.4 conflicts.php
> --- mythweb/conflicts.php 4 May 2003 00:51:11 -0000 1.4
> +++ mythweb/conflicts.php 14 May 2003 16:33:45 -0000
> @@ -16,6 +16,14 @@
>  // conflicts (e.g. Middle East)
>  //
>
> +if ($_POST['makeunmasked'] && $_POST['chanid'] && $_POST['starttime'] &&
$_POST['endtime'])
> +{
> +    $chanid = urldecode($_POST['chanid']);
> +    $starttime = formatConflictTime(urldecode($_POST['starttime']));
> +    $endtime = formatConflictTime(urldecode($_POST['endtime']));
> +    makeUnmasked($chanid,$starttime,$endtime);
> +}
> +
>  if ($_POST['makeactive'] && $_POST['chanid'] && $_POST['starttime'] &&
$_POST['endtime'])
>  {
>      $chanid = urldecode($_POST['chanid']);
> @@ -92,10 +100,11 @@
>   if($color == "#FFFF00")
>      {
>           print "<form action=\"main.php?mode=conflicts\"
method=\"post\">";
> -              print  "<input type=\"hidden\" name=\"makeactive\"
value=\"1\">";
> +              print  "<input type=\"hidden\" name=\"makeunmasked\"
value=\"1\">";
>                print  "<input type=\"hidden\" name=\"chanid\"
value=\"".urlencode($recs[$t][4]). "\">";
>                print  "<input type=\"hidden\" name=\"starttime\"
value=\"".urlencode($recs[$t][11]). "\">";
>                print  "<input type=\"hidden\" name=\"endtime\"
value=\"".urlencode($recs[$t][12]). "\">";
> +       print "<TD><input type=\"submit\" name=\"activatebutton\"
value=\"Activate\"></TD></form>";
>      }
>          print "</TR>\n";
>      }
> Index: mythweb/functions.php
> ===================================================================
> RCS file: /var/lib/mythcvs/mythweb/functions.php,v
> retrieving revision 1.13
> diff -u -r1.13 functions.php
> --- mythweb/functions.php 9 May 2003 16:19:54 -0000 1.13
> +++ mythweb/functions.php 14 May 2003 16:33:48 -0000
> @@ -962,6 +962,13 @@
>   return strtotime("$dom $mon $year $time");
>  }
>
> +function makeUnmasked($chanid,$starttime,$endtime) {
> +    $theQuery = "SELECT chanid,title,subtitle,description FROM program
WHERE chanid='$chanid' AND starttime='$starttime' AND endtime='$endtime'";
> +    $program = mysql_fetch_row(mysql_query($theQuery));
> +    $theQuery = 'DELETE FROM oldrecorded WHERE title="' . $program[1] .
'" AND subtitle="' . $program[2] . '" AND description="' . $program[3] .
'"';
> +    $result = mysql_query($theQuery);
> +}
> +
>  function makeActive($chanid,$starttime,$endtime) {
>      $theQuery = "SELECT preferchanid,preferstarttime,preferendtime FROM
conflictresolutionsingle WHERE dislikechanid='$chanid' AND
dislikestarttime='$starttime' AND dislikeendtime='$endtime'";
>      $oldConflict = mysql_fetch_row(mysql_query($theQuery));
>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list