summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-05-25 12:44:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-05-25 12:44:07 +0200
commit6496d879e5e5de91507a807fbb136d15e3952e1c (patch)
tree8feca8363ca782bd20dad3860b78c57b030f021d
parent2e01178e54eab038d26ecdce20014d5ad386d589 (diff)
downloadvdr-6496d879e5e5de91507a807fbb136d15e3952e1c.tar.gz
vdr-6496d879e5e5de91507a807fbb136d15e3952e1c.tar.bz2
Fixed calculating the start time of repeated timers with "first day"
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--timers.c6
3 files changed, 6 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b966e6de..52d24ee0 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1431,6 +1431,7 @@ Udo Richter <udo_richter@gmx.de>
for suggesting to add 'eval' to the $VDRCMD call in 'runvdr' to avoid problems with
quoting
for fixing handling the "Power" key in case a timer is about to start recording
+ for fixing calculating the start time of repeated timers with "first day"
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
diff --git a/HISTORY b/HISTORY
index 3dfa3111..00a7437c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4727,3 +4727,5 @@ Video Disk Recorder Revision History
be removed once the API version actually needs to be incremented.
- Fixed deleting the 'skinDescriptions' in cMenuSetupOSD::~cMenuSetupOSD() (thanks
to Tobias Grimm).
+- Fixed calculating the start time of repeated timers with "first day" (thanks to
+ Udo Richter).
diff --git a/timers.c b/timers.c
index 4236e406..0989dad1 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.59 2006/05/07 09:01:00 kls Exp $
+ * $Id: timers.c 1.60 2006/05/25 12:32:11 kls Exp $
*/
#include "timers.h"
@@ -347,7 +347,7 @@ bool cTimer::Matches(time_t t, bool Directly, int Margin) const
}
else {
for (int i = -1; i <= 7; i++) {
- time_t t0 = IncDay(t, i);
+ time_t t0 = IncDay(day ? max(day, t) : t, i);
if (DayMatches(t0)) {
time_t a = SetTime(t0, begin);
time_t b = a + length;
@@ -359,7 +359,7 @@ bool cTimer::Matches(time_t t, bool Directly, int Margin) const
}
}
if (!startTime)
- startTime = day; // just to have something that's more than a week in the future
+ startTime = IncDay(t, 7); // just to have something that's more than a week in the future
else if (!Directly && (t > startTime || t > day + SECSINDAY + 3600)) // +3600 in case of DST change
day = 0;
}