[mythtv] [PATCH] Conflict resolution bug.
David Watson
dwatson at eecs.umich.edu
Mon Jun 16 23:15:58 EDT 2003
> Make it like 15, and if you don't mind re-generating the patch, that'd be
> easiest for me. Thanks =)
Attached.
> Well, before, it wouldn't signal a scheduler change after a
> recording had been completed,
I saw that, and as far as I can tell it was included in the CVS
version I was running. Very strange.
David
-------------- next part --------------
Index: programs/mythbackend/scheduler.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/scheduler.cpp,v
retrieving revision 1.24
diff -u -r1.24 scheduler.cpp
--- programs/mythbackend/scheduler.cpp 21 May 2003 01:10:24 -0000 1.24
+++ programs/mythbackend/scheduler.cpp 17 Jun 2003 02:10:14 -0000
@@ -318,12 +318,14 @@
list<ProgramInfo *>::reverse_iterator i;
list<ProgramInfo *>::iterator deliter, q;
+ QDateTime now = QDateTime::currentDateTime();
+
q = recordingList.begin();
while (q != recordingList.end())
{
ProgramInfo *rec = (*q);
- if (rec->startts > QDateTime::currentDateTime())
+ if (rec->startts > now)
{
break;
}
@@ -365,24 +367,23 @@
}
else
{
- for (; j != recordingList.rend(); j++)
+ while (j != recordingList.rend())
{
ProgramInfo *second = (*j);
if (first->IsSameTimeslot(*second))
{
delete second;
deliter = j.base();
- j++;
deliter--;
recordingList.erase(deliter);
}
else if (first->IsSameProgram(*second))
{
- if (second->conflicting && !first->conflicting)
+ if ((second->conflicting && !first->conflicting) ||
+ second->startts < now.addSecs(-15))
{
delete second;
deliter = j.base();
- j++;
deliter--;
recordingList.erase(deliter);
}
@@ -395,6 +396,10 @@
break;
}
}
+ else
+ {
+ j++;
+ }
}
}
}
More information about the mythtv-dev
mailing list