From 945baaafee98d8daeb20647c795c8176479fd5df Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 4 Sep 2011 20:49:11 +0200 Subject: API changes for __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS in vdr-1.7.21 --- searchtimer_thread.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'searchtimer_thread.c') diff --git a/searchtimer_thread.c b/searchtimer_thread.c index b82df28..833b2cd 100644 --- a/searchtimer_thread.c +++ b/searchtimer_thread.c @@ -777,8 +777,13 @@ void cSearchTimerThread::CheckExpiredRecs() cList DelRecordings; for (cRecording *recording = Recordings.First(); recording && m_Active; recording = Recordings.Next(recording)) { +#if APIVERSNUM < 10721 LogFile.Log(3, "check recording %s from %s for expiration", recording->Name(), DAYDATETIME(recording->start)); if (recording->start == 0) +#else + LogFile.Log(3, "check recording %s from %s for expiration", recording->Name(), DAYDATETIME(recording->Start())); + if (recording->Start() == 0) +#endif { LogFile.Log(2, "oops, recording %s has no start time, skipped", recording->Name()); continue; @@ -809,7 +814,12 @@ void cSearchTimerThread::CheckExpiredRecs() LogFile.Log(3, "recording triggered from search timer %s", search->search); if (search->delAfterDays == 0) continue; time_t now = time(NULL); + +#if APIVERSNUM < 10721 int daysBetween = int(double((now - recording->start)) / (60*60*24)); +#else + int daysBetween = int(double((now - recording->Start())) / (60*60*24)); +#endif if (daysBetween >= search->delAfterDays) DelRecordings.Add(new cRecordingObj(recording, search)); else @@ -821,10 +831,18 @@ void cSearchTimerThread::CheckExpiredRecs() cSearchExt* search = recordingObj->search; if (search->recordingsKeep > 0 && search->recordingsKeep >= search->GetCountRecordings()) { +#if APIVERSNUM < 10721 LogFile.Log(1, "recording '%s' from %s expired, but will be kept, search timer %s", recording->Name(), DAYDATETIME(recording->start), recordingObj->search->search); +#else + LogFile.Log(1, "recording '%s' from %s expired, but will be kept, search timer %s", recording->Name(), DAYDATETIME(recording->Start()), recordingObj->search->search); +#endif continue; } +#if APIVERSNUM < 10721 LogFile.Log(1, "delete expired recording '%s' from %s, search timer %s", recording->Name(), DAYDATETIME(recording->start), recordingObj->search->search); +#else + LogFile.Log(1, "delete expired recording '%s' from %s, search timer %s", recording->Name(), DAYDATETIME(recording->Start()), recordingObj->search->search); +#endif cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName()); if (!rc) { -- cgit v1.2.3