Merge branch 'ni/cst-next' into ni/mp/cst-next

Origin commit data
------------------
Branch: ni/coolstream
Commit: b82573e85a
Author: vanhofen <vanhofen@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:
vanhofen
2016-09-26 15:01:13 +02:00
2 changed files with 14 additions and 3 deletions

View File

@@ -2825,7 +2825,8 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
eventinfo.epgID = 0;
eventinfo.epg_starttime = 0;
eventinfo.apids = TIMERD_APIDS_CONF;
eventinfo.recordingSafety = (hh->ParamList["rs"] == "1");
eventinfo.recordingSafety = (hh->ParamList["rs"] == "1") || (hh->ParamList["rs"] == "on");
eventinfo.autoAdjustToEPG = (hh->ParamList["aj"] == "1") || (hh->ParamList["aj"] == "on");
// channel by Id or name
if(!hh->ParamList["channel_id"].empty())

View File

@@ -1193,7 +1193,7 @@ void CTimerEvent_Record::fireEvent()
{
if (adjustToCurrentEPG())
return;
Refresh();
getEpgId();
CTimerd::RecordingInfo ri=eventInfo;
ri.eventID=eventID;
strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str());
@@ -1331,7 +1331,17 @@ 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);
_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,
eventInfo.channel_ci); //NI