summaryrefslogtreecommitdiff
path: root/timerconflict.c
diff options
context:
space:
mode:
Diffstat (limited to 'timerconflict.c')
-rw-r--r--timerconflict.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/timerconflict.c b/timerconflict.c
index 3488487..e2a1fee 100644
--- a/timerconflict.c
+++ b/timerconflict.c
@@ -165,3 +165,13 @@ cTVGuideTimerConflict *cTVGuideTimerConflicts::GetConflict(int conflictIndex) {
return NULL;
return conflicts[conflictIndex];
}
+
+std::vector<cTVGuideTimerConflict*> cTVGuideTimerConflicts::GetConflictsBetween(time_t start, time_t stop) {
+ std::vector<cTVGuideTimerConflict*> conflictsFound;
+ for (int i=0; i < numConflicts; i++) {
+ if ((conflicts[i]->timeStart > start) && (conflicts[i]->timeStart < stop)||
+ (conflicts[i]->timeStop > start) && (conflicts[i]->timeStop < stop))
+ conflictsFound.push_back(conflicts[i]);
+ }
+ return conflictsFound;
+} \ No newline at end of file