[mythtv] [PATCH] Mythweb - daily_record database fix

Chris Osgood mythtv at functionalfuture.com
Tue Dec 30 15:50:18 EST 2003


When setting a program to record in a daily timeslot Mythweb does not set
the date fields correctly.  This breaks the frontend Recording
Priorities panel and possibly other things (?).

If you use Mythweb to setup a daily recorded program then when you go the
recording priorities panel in the frontend it will say:
"You Haven't Scheduled Any Programs To Be Recorded" which is obviously not
true.

The error occurs in the frontend at remoteutil.cpp:156 (length mismatch
between programinfo because the item without dates is missing data).
Then you'll see a QTime::fromString error from both the frontend and
backend.  I'm guessing this is also a symptom of a problem in the backend
and/or frontend that could be made more robust.

Anyway, this patch fixes Mythweb for me.

--
// Chris
-------------- next part --------------
diff -ru mythweb-cvs/includes/programs.php mythweb-patched/includes/programs.php
--- mythweb-cvs/includes/programs.php	2003-12-04 02:43:01.000000000 -0500
+++ mythweb-patched/includes/programs.php	2003-12-30 15:27:05.000000000 -0500
@@ -441,9 +441,11 @@
 	// Wipe out any pre-existing settings for this program
 		$this->record_never(false);
 	// Insert this recording choice into the database
-		$result = mysql_query('REPLACE INTO record (type,chanid,starttime,endtime,title,profile,recpriority,recorddups,maxnewest,maxepisodes,autoexpire) VALUES (2,'
+		$result = mysql_query('REPLACE INTO record (type,chanid,starttime,startdate,endtime,enddate,title,profile,recpriority,recorddups,maxnewest,maxepisodes,autoexpire) VALUES (2,'
 								.escape($this->chanid).','
 								.'FROM_UNIXTIME('.escape($this->starttime).'),'
+								.'FROM_UNIXTIME('.escape($this->starttime).'),'
+								.'FROM_UNIXTIME('.escape($this->endtime).'),'
 								.'FROM_UNIXTIME('.escape($this->endtime).'),'
 								.escape($this->title)  .','
 								.escape($this->profile).','


More information about the mythtv-dev mailing list