From 18eb185ce872eda49a13a0c5f91bc4d0ecdb7b9b Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Mon, 3 Oct 2011 17:58:30 +0200 Subject: Don't use deprecated member access (introduced in VDR 1.7.21). --- enigma.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'enigma.c') diff --git a/enigma.c b/enigma.c index fa828c6..891b1e9 100644 --- a/enigma.c +++ b/enigma.c @@ -2615,8 +2615,13 @@ void cSkinEnigmaDisplayMenu::SetRecording(const cRecording *Recording) // draw recording date string std::stringstream sstrDate; +#if VDRVERSNUM >= 10721 + sstrDate << *DateString(Recording->Start()) + << " " << *TimeString(Recording->Start()); +#else sstrDate << *DateString(Recording->start) << " " << *TimeString(Recording->start); +#endif unsigned long long nRecSize = -1; unsigned long long nFileSize[1000]; @@ -2672,14 +2677,19 @@ void cSkinEnigmaDisplayMenu::SetRecording(const cRecording *Recording) bool fCutIn = true; cMark *mark = marks.First(); while (mark) { - index->Get(mark->position, &FileNumber, &FileOffset); //TODO: will disc spin up? +#if VDRVERSNUM >= 10721 + int pos = mark->Position(); +#else + int pos = mark->position; +#endif + index->Get(pos, &FileNumber, &FileOffset); //TODO: will disc spin up? if (fCutIn) { - nCutInFrame = mark->position; + nCutInFrame = pos; fCutIn = false; if (nRecSize >= 0) nCutInOffset = nFileSize[FileNumber-1] + FileOffset; } else { - nCutLength += mark->position - nCutInFrame; + nCutLength += pos - nCutInFrame; fCutIn = true; if (nRecSize >= 0) nRecSizeCut += nFileSize[FileNumber-1] + FileOffset - nCutInOffset; @@ -2776,8 +2786,13 @@ void cSkinEnigmaDisplayMenu::SetRecording(const cRecording *Recording) } delete index; +#if VDRVERSNUM >= 10721 + sstrInfo << trVDR("Priority") << ": " << Recording->Priority() << std::endl + << trVDR("Lifetime") << ": " << Recording->Lifetime() << std::endl; +#else sstrInfo << trVDR("Priority") << ": " << Recording->priority << std::endl << trVDR("Lifetime") << ": " << Recording->lifetime << std::endl; +#endif if (Info->Aux()) { sstrInfo << std::endl << tr("Auxiliary information") << ":\n" << parseaux(Info->Aux()); -- cgit v1.2.3