timerd: honor recording safety when modifying timers

Origin commit data
------------------
Branch: ni/coolstream
Commit: 67a375f4da
Author: martii <m4rtii@gmx.de>
Date: 2016-09-26 (Mon, 26 Sep 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2016-09-26 13:57:34 +02:00
committed by vanhofen
parent 190283c2fc
commit 82a85e0817

View File

@@ -1319,7 +1319,18 @@ bool CTimerEvent_Record::adjustToCurrentEPG()
if (first == evtlist.end())
return false;
CTimerEvent_Record *event= new CTimerEvent_Record(first->startTime - (alarmTime - announceTime), first->startTime, first->startTime + first->duration,
time_t _announceTime = first->startTime - (alarmTime - announceTime);
time_t _alarmTime = first->startTime;
time_t _stopTime = first->startTime + first->duration;
if (recordingSafety) {
int pre, post;
CTimerManager::getInstance()->getRecordingSafety(pre, post);
_announceTime -= pre;
_alarmTime -= pre;
_stopTime += post;
}
CTimerEvent_Record *event= new CTimerEvent_Record(_announceTime, _alarmTime, _stopTime,
eventInfo.channel_id, eventInfo.epgID, first->startTime, eventInfo.apids,
CTimerd::TIMERREPEAT_ONCE, 1, recordingDir, recordingSafety, autoAdjustToEPG);
CTimerManager::getInstance()->addEvent(event,false);