#! /bin/sh /usr/share/dpatch/dpatch-run ## 13_ignore_distant_timers.dpatch by Thomas Dingermann ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Ignore timers due to start >= 2 days from now @DPATCH@ diff -urNad vdr-1.3.18/timers.c /tmp/dpep.d4jqSK/vdr-1.3.18/timers.c --- vdr-1.3.18/timers.c 2005-01-09 17:03:30.000000000 +0000 +++ /tmp/dpep.d4jqSK/vdr-1.3.18/timers.c 2005-01-09 17:03:32.000000000 +0000 @@ -545,6 +545,7 @@ if (Schedules) { if (!lastSetEvents || Schedules->Modified() >= lastSetEvents) { for (cTimer *ti = First(); ti; ti = Next(ti)) { + if (ti->StartTime() - time(NULL) > 60*60*24*2) continue; // #reduce cpu load const cSchedule *Schedule = Schedules->GetSchedule(ti->Channel()->GetChannelID()); if (Schedule) { if (!lastSetEvents || Schedule->Modified() >= lastSetEvents) {