summaryrefslogtreecommitdiff
path: root/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'timer.c')
-rw-r--r--timer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/timer.c b/timer.c
index 28c8a6c..80cdbba 100644
--- a/timer.c
+++ b/timer.c
@@ -27,6 +27,15 @@ int cUpdate::checkSwitchTimer()
if (time(0) < swTimer->start)
{
+ if (!swTimer->notified && Epg2VdrConfig.switchTimerNotifyTime && time(0) >= swTimer->start - Epg2VdrConfig.switchTimerNotifyTime)
+ {
+ char* buf;
+ asprintf(&buf, "Switching in %ld seconds to '%s'", swTimer->start-time(0), swTimer->channelId.c_str());
+ Skins.Message(mtInfo, buf);
+ free(buf);
+ swTimer->notified = yes;
+ }
+
it++;
continue;
}
@@ -505,6 +514,7 @@ int cUpdate::takeSwitchTimer()
switchTimers[timerid].eventId = timerDb->getIntValue("EVENTID");
switchTimers[timerid].channelId = timerDb->getStrValue("CHANNELID");
switchTimers[timerid].start = timerDb->getIntValue("_STARTTIME");
+ switchTimers[timerid].notified = no;
timerDb->setCharValue("ACTION", taAssumed);
timerDb->setCharValue("STATE", tsPending);