From 9bfa02dd31798d816ada3ebec1c4d7242300cf95 Mon Sep 17 00:00:00 2001 From: TomJoad Date: Wed, 7 Jun 2017 21:51:56 +0200 Subject: Use vdr timerids instead of index. --- conflictcheck.c | 4 ++-- conflictcheck.h | 4 ++-- epgsearchsvdrp.c | 4 ++-- services.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conflictcheck.c b/conflictcheck.c index 652a636..7b30ccd 100644 --- a/conflictcheck.c +++ b/conflictcheck.c @@ -270,7 +270,7 @@ cList* cConflictCheck::CreateCurrentTimerList() cTimer* clone = new cTimer(*ti); clone->SetEvent(ti->Event()); - cConflictCheckTimerObj* timerObj = new cConflictCheckTimerObj(clone, ti->StartTime(), ti->StopTime(), deviceNr, ti->Index()); + cConflictCheckTimerObj* timerObj = new cConflictCheckTimerObj(clone, ti->StartTime(), ti->StopTime(), deviceNr, ti->Id()); if (deviceNr >= 0) { devices[deviceNr].recTimers.insert(timerObj); @@ -322,7 +322,7 @@ cList* cConflictCheck::CreateCurrentTimerList() cTimer* clone = new cTimer(*ti); clone->SetEvent(ti->Event()); - cConflictCheckTimerObj* timerObj = new cConflictCheckTimerObj(clone, Start, Start + ti->StopTime() - ti->StartTime(), deviceNr, ti->Index()); + cConflictCheckTimerObj* timerObj = new cConflictCheckTimerObj(clone, Start, Start + ti->StopTime() - ti->StartTime(), deviceNr, ti->Id()); LogFile.Log(3,"add timer '%s' (%s, channel %s) for conflict check", ti->File(), DAYDATETIME(Start), CHANNELNAME(ti->Channel())); if (deviceNr >= 0) { diff --git a/conflictcheck.h b/conflictcheck.h index 4afc05d..049243c 100644 --- a/conflictcheck.h +++ b/conflictcheck.h @@ -61,11 +61,11 @@ class cConflictCheckTimerObj : public cTimerObj int Matches(const cEvent *Event, int *Overlap) const; const cTimer* OrigTimer(const cTimers* timers) const { - return timers->GetTimer(timer); + return timers->GetById(timer->Id(),timer->Remote()); } cTimer* OrigTimer(cTimers* timers) { - return timers->GetTimer(timer); + return timers->GetById(timer->Id(),timer->Remote()); } }; diff --git a/epgsearchsvdrp.c b/epgsearchsvdrp.c index 2f5720e..591201c 100644 --- a/epgsearchsvdrp.c +++ b/epgsearchsvdrp.c @@ -1277,13 +1277,13 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option, if (relOnly && (*it)->ignore) continue; std::ostringstream timerpart; int recPart = (*it)->recDuration * 100 / ((*it)->stop - (*it)->start); - timerpart << (*it)->origIndex+1 << "|" << recPart << "|"; + timerpart << (*it)->timer->Id() << "|" << recPart << "|"; std::set::iterator itcc; if ((*it)->concurrentTimers) { std::ostringstream cctimers; for (itcc = (*it)->concurrentTimers->begin(); itcc != (*it)->concurrentTimers->end(); ++itcc) - cctimers << (cctimers.str().empty()?"":"#") << (*itcc)->origIndex+1; + cctimers << (cctimers.str().empty()?"":"#") << (*itcc)->timer->Id(); timerpart << cctimers.str(); } timerparts << (timerparts.str().empty()?"":":") << timerpart.str(); diff --git a/services.c b/services.c index 6e5f9c4..617c9b3 100644 --- a/services.c +++ b/services.c @@ -299,13 +299,13 @@ std::list cEpgsearchServiceHandler::TimerConflictList(bool relOnly) if (relOnly && (*it)->ignore) continue; std::ostringstream timerpart; int recPart = (*it)->recDuration * 100 / ((*it)->stop - (*it)->start); - timerpart << (*it)->origIndex+1 << "|" << recPart << "|"; + timerpart << (*it)->timer->Id() << "|" << recPart << "|"; std::set::iterator itcc; if ((*it)->concurrentTimers) { std::ostringstream cctimers; for (itcc = (*it)->concurrentTimers->begin(); itcc != (*it)->concurrentTimers->end(); ++itcc) - cctimers << (cctimers.str().empty()?"":"#") << (*itcc)->origIndex+1; + cctimers << (cctimers.str().empty()?"":"#") << (*itcc)->timer->Id(); timerpart << cctimers.str(); } timerparts << (timerparts.str().empty()?"":":") << timerpart.str(); -- cgit v1.2.3