timerlist/controlapi: handle epg_id as channel_id

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1dd6614569
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-04-27 (Sat, 27 Apr 2019)

Origin message was:
------------------
- timerlist/controlapi: handle epg_id as channel_id

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2019-04-27 13:07:55 +02:00
parent 59846ce80c
commit 9e4b2f9383
2 changed files with 2 additions and 2 deletions

View File

@@ -878,7 +878,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.epgID = (event_id_t) atoi(remotetimers[i].get("epg_id","").asString());
sscanf(remotetimers[i].get("epg_id","").asString().c_str(), SCANF_CHANNEL_ID_TYPE, &rtimer.epgID);
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));
rtimer.epgTitle[sizeof(rtimer.epgTitle) - 1] = 0;

View File

@@ -2736,7 +2736,7 @@ void CControlAPI::SendTimers(CyhookHandler *hh)
timer_item += hh->outObject("audio", audio, true);
timer_item += hh->outPair("recording_dir", timer->recordingDir, true);
timer_item += hh->outPair("epg_id", string_printf("%d", (int)timer->epgID), false);
timer_item += hh->outPair("epg_id", string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer->epgID), false);
}
break;