summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomJoad <TomJoad@vdr-portal.de>2017-06-07 21:51:56 +0200
committerFrank Neumann <fnu@yavdr.org>2017-06-07 21:53:16 +0200
commit9bfa02dd31798d816ada3ebec1c4d7242300cf95 (patch)
treedfa6d3abbc740a9f0f24de7e7459d1311f37a401
parenta2e3e7d8e53ad43b1da09bf99c990a19cd947c56 (diff)
downloadvdr-plugin-epgsearch-9bfa02dd31798d816ada3ebec1c4d7242300cf95.tar.gz
vdr-plugin-epgsearch-9bfa02dd31798d816ada3ebec1c4d7242300cf95.tar.bz2
Use vdr timerids instead of index.
-rw-r--r--conflictcheck.c4
-rw-r--r--conflictcheck.h4
-rw-r--r--epgsearchsvdrp.c4
-rw-r--r--services.c4
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();
diff --git a/services.c b/services.c
index 6e5f9c4..617c9b3 100644
--- a/services.c
+++ b/services.c
@@ -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();