[mythtv] Recordings are starting late

David Engel gigem at comcast.net
Mon Mar 15 13:06:52 EST 2004


On Mon, Mar 15, 2004 at 11:19:16AM -0500, Isaac Richards wrote:
> On Monday 15 March 2004 10:32 am, David Engel wrote:
> > FYI, I was able to reproduce the problem myself late last night,
> > though not to the same degree as you (I get a much smaller delay).
> > I'm going to look at it tonight.  If it turns out to be DB cotention,
> > I'm not sure what can be done.
> 
> How 'bout just delaying the scheduler run if a program is starting within X 
> seconds?

That's probably a good idea, but still it feels a little dirty in that
its more work-around than fix.  How long should X be, 30 seoncds?

Attached is a completely untested patch if anyone wants to try it.  I
won't be able to test it myself until this evening.

David
-- 
David Engel
gigem at comcast.net
-------------- next part --------------
Index: programs/mythbackend/scheduler.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/scheduler.cpp,v
retrieving revision 1.87
diff -u -r1.87 scheduler.cpp
--- programs/mythbackend/scheduler.cpp	14 Mar 2004 05:59:48 -0000	1.87
+++ programs/mythbackend/scheduler.cpp	15 Mar 2004 18:02:37 -0000
@@ -761,8 +761,10 @@
         curtime = QDateTime::currentDateTime();
         bool statuschanged = false;
 
-        if (CheckForChanges() ||
-            (lastupdate.date().day() != curtime.date().day()))
+        if (startIter != reclist.end() && 
+            curtime.secsTo((*startIter)->recstartts) > 30 &&
+            (CheckForChanges() ||
+             (lastupdate.date().day() != curtime.date().day())))
         {
             VERBOSE(VB_GENERAL, "Found changes in the todo list.");
             FillEncoderFreeSpaceCache();


More information about the mythtv-dev mailing list