[mythtv] [PATCH] Conflict resolution bug.
David Watson
dwatson at eecs.umich.edu
Fri Jun 13 23:06:33 EDT 2003
This patch prevents the scheduler from choosing an already started
program instead of a future program that has no conflicts.
It also fixes a simple bug that causes the search to skip over
an entry after a delete.
David
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 14 Jun 2003 01:38:37 -0000
@@ -365,24 +365,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 < QDateTime::currentDateTime())
{
delete second;
deliter = j.base();
- j++;
deliter--;
recordingList.erase(deliter);
}
@@ -395,6 +394,10 @@
break;
}
}
+ else
+ {
+ j++;
+ }
}
}
}
More information about the mythtv-dev
mailing list