remotetimers: fix fetch from other box

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
TangoCash
2018-10-12 19:40:05 +02:00
committed by Thilo Graf
parent f81f2d9501
commit 664343baea
2 changed files with 4 additions and 10 deletions

View File

@@ -111,7 +111,7 @@ class CTimerdClient:private CBasicClient
// adds new record timer event // adds new record timer event
int addRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, int addRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime,
uint64_t epgID=0, time_t epg_starttime=0, time_t announcetime = 0, uint64_t epgID=0, time_t epg_starttime=0, time_t announcetime = 0,
unsigned char apids=TIMERD_APIDS_STD, bool safety=false,bool autoAdjust=false, std::string recDir="", bool forceAdd=true) unsigned char apids=TIMERD_APIDS_STD, bool safety=false,bool autoAdjust=false, std::string recDir="", bool forceAdd=true, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 0)
{ {
CTimerd::RecordingInfo eventInfo; CTimerd::RecordingInfo eventInfo;
eventInfo.channel_id = channel_id; eventInfo.channel_id = channel_id;
@@ -121,7 +121,7 @@ class CTimerdClient:private CBasicClient
eventInfo.recordingSafety = safety; eventInfo.recordingSafety = safety;
eventInfo.autoAdjustToEPG = autoAdjust; eventInfo.autoAdjustToEPG = autoAdjust;
strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN); strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN);
return addTimerEvent(CTimerd::TIMER_RECORD, &eventInfo, announcetime, alarmtime, stoptime,CTimerd::TIMERREPEAT_ONCE, 0,forceAdd); return addTimerEvent(CTimerd::TIMER_RECORD, &eventInfo, announcetime, alarmtime, stoptime, evrepeat, repeatcount,forceAdd);
}; };
int addImmediateRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, int addImmediateRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime,

View File

@@ -478,7 +478,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
int res = Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + timerlist[selected].rem_pre, int res = Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + timerlist[selected].rem_pre,
timerlist[selected].stopTime - timerlist[selected].rem_post, 0, 0, timerlist[selected].announceTime + timerlist[selected].rem_pre, timerlist[selected].stopTime - timerlist[selected].rem_post, 0, 0, timerlist[selected].announceTime + timerlist[selected].rem_pre,
TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL),"",false); TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL),"",false, timerlist[selected].eventRepeat, timerlist[selected].repeatCount);
if (res == -1) if (res == -1)
{ {
@@ -488,15 +488,9 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
{ {
res = Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + timerlist[selected].rem_pre, res = Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + timerlist[selected].rem_pre,
timerlist[selected].stopTime - timerlist[selected].rem_post, 0, 0, timerlist[selected].announceTime + timerlist[selected].rem_pre, timerlist[selected].stopTime - timerlist[selected].rem_post, 0, 0, timerlist[selected].announceTime + timerlist[selected].rem_pre,
TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL),"",true); TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL),"", true, timerlist[selected].eventRepeat, timerlist[selected].repeatCount);
} }
} }
if (res > 0)
Timer->modifyTimerEvent(res, timerlist[selected].announceTime + timerlist[selected].rem_pre,
timerlist[selected].alarmTime + timerlist[selected].rem_pre,
timerlist[selected].stopTime - timerlist[selected].rem_post,
timerlist[selected].eventRepeat,
timerlist[selected].repeatCount);
CHTTPTool httpTool; CHTTPTool httpTool;
std::string r_url; std::string r_url;