From 9de337d2ee7740b238181ec59056a4baaaa36a63 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 18 Apr 2021 14:56:40 +0200 Subject: The new functions cTimer::Start/StopTimeEvent() are now used in the LCARS skin to display the start/stop times of timers in the main menu --- timers.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'timers.c') diff --git a/timers.c b/timers.c index a3931d3a..fed6d88d 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 5.13 2021/04/16 16:26:47 kls Exp $ + * $Id: timers.c 5.14 2021/04/18 14:56:40 kls Exp $ */ #include "timers.h" @@ -713,6 +713,28 @@ time_t cTimer::StopTime(void) const return stopTime; } +time_t cTimer::StartTimeEvent(void) const +{ + if (event) { + if (HasFlags(tfVps) && event->Vps()) + return event->StartTime(); + else if (HasFlags(tfSpawned)) + return event->StartTime() - Setup.MarginStart * 60; + } + return StartTime(); +} + +time_t cTimer::StopTimeEvent(void) const +{ + if (event) { + if (HasFlags(tfVps) && event->Vps()) + return event->EndTime(); + else if (HasFlags(tfSpawned)) + return event->EndTime() + Setup.MarginStop * 60; + } + return StopTime(); +} + #define EPGLIMITBEFORE (1 * 3600) // Time in seconds before a timer's start time and #define EPGLIMITAFTER (1 * 3600) // after its stop time within which EPG events will be taken into consideration. -- cgit v1.2.3