From b1b244a5b7ff76e6b6a07e05c0afe4cb0f69d6b4 Mon Sep 17 00:00:00 2001 From: horchi Date: Thu, 22 Feb 2018 19:09:47 +0100 Subject: 2018-02-22 version 1.1.88 (horchi)\n - added: Optional switch timer notification message\n\n --- timer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'timer.c') 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); -- cgit v1.2.3