diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 1254f9e96..a462be3c0 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -721,10 +721,6 @@ CTimerd::CTimerEventTypes CEventList::isScheduled(t_channel_id channel_id, CChan return timer->eventType; } } - if (timer->eventType == CTimerd::TIMER_REMOTEBOX && timer->alarmTime + timer->rem_pre == event->startTime) { - printf("alarmTime: %ld + rem_pre %d = startTime %ld ?\n",timer->alarmTime, timer->rem_pre, event->startTime); - return timer->eventType; - } } } return (CTimerd::CTimerEventTypes) 0; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 4bff65f28..aac0b23b4 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -439,6 +439,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) r_url += "/control/timer?action=new&update=1"; r_url += "&alarm=" + to_string((int)timerlist[selected].alarmTime); r_url += "&stop=" + to_string((int)timerlist[selected].stopTime); + r_url += "&start=" + to_string((int)timerlist[selected].epg_starttime); r_url += "&announce=" + to_string((int)timerlist[selected].announceTime); r_url += "&channel_id=" + string_printf_helper(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timerlist[selected].channel_id); r_url += "&aj=on"; @@ -468,6 +469,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) r_url += "/control/timer?action=new"; r_url += "&alarm=" + to_string((int)timerlist[selected].alarmTime + pre); r_url += "&stop=" + to_string((int)timerlist[selected].stopTime - post); + r_url += "&start=" + to_string((int)timerlist[selected].epg_starttime); r_url += "&announce=" + to_string((int)timerlist[selected].announceTime + pre); r_url += "&channel_id=" + string_printf_helper(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timerlist[selected].channel_id); r_url += "&aj=on"; @@ -539,6 +541,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) r_url += "/control/timer?action=new&update=1"; r_url += "&alarm=" + to_string((int)timerlist[selected].alarmTime); r_url += "&stop=" + to_string((int)timerlist[selected].stopTime); + r_url += "&start=" + to_string((int)timerlist[selected].epg_starttime); r_url += "&announce=" + to_string((int)timerlist[selected].announceTime); r_url += "&channel_id=" + string_printf_helper(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timerlist[selected].channel_id); r_url += "&aj=on"; @@ -878,6 +881,7 @@ void CTimerList::RemoteBoxTimerList(CTimerd::TimerList &rtimerlist) rtimer.alarmTime = (time_t) atoll(remotetimers[i]["alarm"][0].get("digits","").asString().c_str()); rtimer.announceTime = (time_t) atoll(remotetimers[i]["announce"][0].get("digits","").asString().c_str()); rtimer.stopTime = (time_t) atoll(remotetimers[i]["stop"][0].get("digits","").asString().c_str()); + rtimer.epg_starttime = (time_t) atoll(remotetimers[i]["start"][0].get("digits","").asString().c_str()); sscanf(remotetimers[i].get("epg_id","").asString().c_str(), SCANF_CHANNEL_ID_TYPE, &rtimer.epg_id); sscanf(remotetimers[i].get("channel_id","").asString().c_str(), SCANF_CHANNEL_ID_TYPE, &rtimer.channel_id); strncpy(rtimer.epgTitle,remotetimers[i].get("title","").asString().c_str(),sizeof(rtimer.epgTitle)); diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 5b43ec2be..7f92bc3e6 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -2636,6 +2636,13 @@ void CControlAPI::SendTimers(CyhookHandler *hh) timer_item += hh->outArray("stop", stop, true); } + // epg_starttime + std::string start = ""; + struct tm *startTime = localtime(&(timer->epg_starttime)); + start += hh->outArrayItem("normal", _SendTime(hh, startTime, (int)timer->epg_starttime), false); + + timer_item += hh->outArray("start", start, true); + // repeat std::string repeat = ""; @@ -2984,7 +2991,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) CTimerd::RecordingInfo recinfo; CTimerd::EventInfo eventinfo; eventinfo.epg_id = 0; - eventinfo.epg_starttime = 0; + eventinfo.epg_starttime = atoi(hh->ParamList["start"].c_str()); eventinfo.apids = TIMERD_APIDS_CONF; eventinfo.recordingSafety = (hh->ParamList["rs"] == "1") || (hh->ParamList["rs"] == "on"); eventinfo.autoAdjustToEPG = (hh->ParamList["aj"] == "1") || (hh->ParamList["aj"] == "on");