From f5e43c4f77f0cda4fe202a6baa33a36a5b8d75e8 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Sat, 19 Nov 2016 11:57:27 +0100 Subject: [PATCH] [timers] fix start timers Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/de6f90ac2755d6bc0422c0c0f173fa8835200d9b Author: TangoCash Date: 2016-11-19 (Sat, 19 Nov 2016) --- src/timerd/timermanager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index ce6e7b4e0..9f12a5ff6 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -1216,7 +1216,7 @@ CTimerEvent_Record::CTimerEvent_Record(CConfigFile *config, int iId): //------------------------------------------------------------ void CTimerEvent_Record::fireEvent() { - if (adjustToCurrentEPG()) + if ((adjustToCurrentEPG()) && (alarmTime > time(NULL))) return; getEpgId(); CTimerd::RecordingInfo ri=eventInfo; @@ -1232,7 +1232,7 @@ void CTimerEvent_Record::fireEvent() //------------------------------------------------------------ void CTimerEvent_Record::announceEvent() { - if (adjustToCurrentEPG()) + if ((adjustToCurrentEPG()) && (announceTime > time(NULL))) return; Refresh(); CTimerd::RecordingInfo ri=eventInfo; @@ -1368,9 +1368,11 @@ bool CTimerEvent_Record::adjustToCurrentEPG() _stopTime += post; } - if ((_alarmTime != alarmTime) || (_announceTime != announceTime) || (_stopTime != stopTime)) + if ((_alarmTime != alarmTime) || (_announceTime != announceTime) || (_stopTime != stopTime)) { + alarmTime = _alarmTime; announceTime = _announceTime; stopTime = _stopTime; if (CTimerManager::getInstance()->adjustEvent(eventID, _announceTime, _alarmTime, _stopTime)) return true; + } return false; }