[mythtv] 6544 patch to fix bug with incorrect shows being listed as upcoming

Kirby Vandivort kvandivo at ks.uiuc.edu
Sat Oct 4 13:44:16 EDT 2003


This patch automatically excludes shows that have a start time earlier
than currentDateTime() from the list of upcoming shows that the server
is planning to record.

There is a bug in the GetAllPending code (a well hidden bug, mind you,
and I haven't had the time to step through all of that code) that causes
it to return programs that it shouldn't when
- The current timeslot has a conflict
- The tuner(s) are busy recording something.

If this situation is met, the GetAllPending code will return the alternate
shows as being shows that are upcoming recordings.  GetAllPending is
currently being used for the fix conflicts screen as well as the 6544
status.

I suspect that the most robust way to fix this would be to add in the
currently recording shows into the list when the GetAllPending code
is calculating conflicts, etc and then remove them before sending the
results to the calling function.  This would cause the GetAllPending
code to be able to accurately determine that a conflict exists, and that
the alternate shows shouldn't have their 'record' flag set.

So, this little fix helps with that on the 6544 display.  It could
still have problems if, for instance, there was an 8-9pm show that it
is recording, there was a conflict from 8:30-9, and the current time is
between 8 and 8:30.  But, this gets us closer.

-- 

Kirby Vandivort                      Theoretical and 
Senior Research Programmer            Computational Biophysics 
Email: kvandivo at ks.uiuc.edu          3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/    University of Illinois
Phone: (217) 244-5711                405 N. Mathews Ave
Fax  : (217) 244-6078                Urbana, IL  61801, USA
-------------- next part --------------
Index: programs/mythbackend/mainserver.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/mainserver.cpp,v
retrieving revision 1.84
diff -b -u -2 -r1.84 mainserver.cpp
--- programs/mythbackend/mainserver.cpp	2 Oct 2003 07:43:36 -0000	1.84
+++ programs/mythbackend/mainserver.cpp	4 Oct 2003 17:34:38 -0000
@@ -2396,6 +2425,7 @@
             iter++, i++)
        {
-           if (!(*iter)->recording) // skip it, and don't count it as
-           {                         // one of our number
+           if (!(*iter)->recording ||    // bad entry.  don't show as upcoming
+               ((*iter)->startts) < QDateTime::currentDateTime()) // recording
+           {                         
                i--;
            }


More information about the mythtv-dev mailing list