diff options
author | TomJoad <TomJoad@vdr-portal.de> | 2017-06-07 21:51:56 +0200 |
---|---|---|
committer | Frank Neumann <fnu@yavdr.org> | 2017-06-07 21:53:16 +0200 |
commit | 9bfa02dd31798d816ada3ebec1c4d7242300cf95 (patch) | |
tree | dfa6d3abbc740a9f0f24de7e7459d1311f37a401 | |
parent | a2e3e7d8e53ad43b1da09bf99c990a19cd947c56 (diff) | |
download | vdr-plugin-epgsearch-9bfa02dd31798d816ada3ebec1c4d7242300cf95.tar.gz vdr-plugin-epgsearch-9bfa02dd31798d816ada3ebec1c4d7242300cf95.tar.bz2 |
Use vdr timerids instead of index.
-rw-r--r-- | conflictcheck.c | 4 | ||||
-rw-r--r-- | conflictcheck.h | 4 | ||||
-rw-r--r-- | epgsearchsvdrp.c | 4 | ||||
-rw-r--r-- | 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<cConflictCheckTimerObj>* 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<cConflictCheckTimerObj>* 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<cConflictCheckTimerObj*,TimerObjSort>::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(); @@ -299,13 +299,13 @@ std::list<std::string> 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<cConflictCheckTimerObj*,TimerObjSort>::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(); |