[mythtv] PATCH for MythWeb to allow unsuppressing a recording

Joseph A. Caputo jcaputo1 at comcast.net
Wed May 14 14:41:12 EDT 2003


I think removing entries from the OLDRECORDED table is not a good idea, as the 
information about what's been recorded is not recoverable.  I think a better 
solution would be to add a "overridesuppress" column to the RECORD and 
PROGRAM tables, and modifying the query in scheduledrecording.cpp to check 
for those to be non-null.  The column in the PROGRAM table could be used for 
single-instance overrides, whereas the column in the RECORD table could be 
used to ignore duplicates for all instances of a scheduled recording.  The 
single-instance override would be for use on the FixConflicts page, whereas 
the all-instance override would be set on the ScheduleRecording page.

The columns and modification to the query could be put in immediately with no 
real impact until someone writes an interface (either via MythWeb or in 
mythfrontend, or both)

I'll put this on my ever-growing Myth to-do list; if someone wants to get to 
it first (Please!), do.

-JAC

On Wednesday 14 May 2003 12:39 pm, jasonmiller at micron.com wrote:
> 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