From 58d7780f66f2b5ee7d91e99f90ef73fb93691eef Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 17 Jan 2010 15:28:09 +0100 Subject: check of recordings length in test of complete recordings active --- HISTORY | 2 ++ HISTORY.DE | 2 ++ recstatus.c | 11 ++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index d2f7893..475b78b 100644 --- a/HISTORY +++ b/HISTORY @@ -86,6 +86,8 @@ new: thanks to Ville Skyttä for providing a patch. - externally triggered search timer updates (via service interface or SVDRP) will now automatically activate the setting "Use search timers" in the setup. +- epgsearch now also checks the recordings length among the correct start and stop time of a timer + when testing for complete recordings. 98% and more are handled as complete. fixes: - fixed a crash when pressing 'Ok' in an empty timers done menu diff --git a/HISTORY.DE b/HISTORY.DE index 0f0efcd..b7919c9 100644 --- a/HISTORY.DE +++ b/HISTORY.DE @@ -90,6 +90,8 @@ neu: werden, Danke an Ville Skyttä für den Patch. - Externe Suchtimer-Updates (via service interface oder SVDRP) aktivieren nun automatisch die Option "Suchtimer verw." im Setup. +- epgsearch prüft nun neben korrekter Start- und Stopzeit des Timers auch die Aufnahmelänge + bei der Prüfung auf vollständige Aufnahmen. 98% und mehr gelten als vollständig. fixes: - Absturz beim Drücken von 'Ok' in leerem Menü erledigter Timer behoben diff --git a/recstatus.c b/recstatus.c index 0a3f977..fe5a0fd 100644 --- a/recstatus.c +++ b/recstatus.c @@ -130,19 +130,24 @@ void cRecStatusMonitor::Recording(const cDevice *Device, const char *Name, const bool complete = true; cRecording *pRecording = Recordings.GetByName(Filename); long timerLengthMins = (tiR->timer->StopTime()-tiR->timer->StartTime())/60; + int recFraction = 100; if (pRecording && timerLengthMins) { int recLen = RecLengthInMins(pRecording); - LogFile.Log(2,"recorded %ld of %ld minutes %.0f", recLen, timerLengthMins, recLen * 100 / timerLengthMins); + recFraction = double(recLen) * 100 / timerLengthMins; } - if (now < tiR->timer->StopTime()) + if (now < tiR->timer->StopTime() || recFraction < 98) // assure timer has reached its end or at least 98% were recorded { complete = false; - LogFile.Log(1,"finished: '%s' (not complete!); search timer: '%s'", tiR->timer->File(), search->search); + LogFile.Log(1,"finished: '%s' (not complete! - recorded only %d%%); search timer: '%s'", tiR->timer->File(), recFraction, search->search); } else + { LogFile.Log(1,"finished: '%s'; search timer: '%s'", tiR->timer->File(), search->search); + if (recFraction < 100) + LogFile.Log(2,"recorded %d%%'", recFraction); + } if (complete) { RecsDone.Add(tiR->recDone); -- cgit v1.2.3