summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-04-18 14:56:40 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-04-18 14:56:40 +0200
commit9de337d2ee7740b238181ec59056a4baaaa36a63 (patch)
tree875b613dce0561bd92d625d003a1ed0329b440fb /timers.c
parentfa8c7c35b5869497df02253cd7b6fc6da566f423 (diff)
downloadvdr-9de337d2ee7740b238181ec59056a4baaaa36a63.tar.gz
vdr-9de337d2ee7740b238181ec59056a4baaaa36a63.tar.bz2
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
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c24
1 files changed, 23 insertions, 1 deletions
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.