From b7dcf13a849bc387102e5f6124d3a5babf989645 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Fri, 26 Aug 2011 18:16:45 +0200 Subject: fixed check of complete VPS recordings, thx to durchflieger@vdr-portal --- HISTORY | 6 ++++-- HISTORY.DE | 4 +++- recstatus.c | 13 +++++++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/HISTORY b/HISTORY index f350113..dbcd380 100644 --- a/HISTORY +++ b/HISTORY @@ -1,7 +1,7 @@ VDR Plugin 'epgsearch' Revision History --------------------------------------- -2010-xx-xx; Version 0.9.25 +2011-xx-xx; Version 0.9.25 new: - avoid repeats with new 'compare date' entry: compare two events by their date to ignore repeats within the same day, week or month @@ -151,7 +151,9 @@ fixes: to gnapheus@vdrportal for reporting. - fixed case insensitve searching when Utf-8 characters are involved, thanks to Ville Skyttä for reporting - +- fixed check of complete VPS recordings, thanks to durchflieger@vdr-portal for providing + a patch. + 2008-04-29: Version 0.9.24 new: diff --git a/HISTORY.DE b/HISTORY.DE index 041ea19..7c5b101 100644 --- a/HISTORY.DE +++ b/HISTORY.DE @@ -1,7 +1,7 @@ VDR Plugin 'epgsearch' Revision History --------------------------------------- -2010-xx-xx; Version 0.9.25 +2011-xx-xx; Version 0.9.25 neu: - Vermeide Wiederholungen mit 'Vergleiche Zeitpunkt': dabei werden 2 Sendungen anhand des Zeitpunkts der Ausstrahlung verglichen, um z.B. Wiederholungen @@ -160,6 +160,8 @@ fixes: Danke an gnapheus@vdrportal für den Hinweis. - Korrektur der Suche ohne Unterscheidung von Groß-/Kleinschreibung in Verbindung mit Utf-8-Zeichen, danke an Ville Skyttä für den Hinweis. +- Prüfung auf Vollständigkeit von VPS-Aufnahmen korrigiert, Danke an durchflieger@vdr-portal + für einen Patch. 2008-04-29: Version 0.9.24 diff --git a/recstatus.c b/recstatus.c index b2f3a0e..1c43f9e 100644 --- a/recstatus.c +++ b/recstatus.c @@ -78,7 +78,8 @@ void cRecStatusMonitor::Recording(const cDevice *Device, const char *Name, const if (!search || (search->avoidRepeats == 0 && search->delMode == 0)) // ignore if not avoid repeats and no auto-delete continue; - LogFile.Log(1,"recording started '%s' on device %d (search timer '%s')", Name, Device->CardIndex(), search->search); + bool vpsUsed = ti->HasFlags(tfVps) && ti->Event() && ti->Event()->Vps(); + LogFile.Log(1,"recording started '%s' on device %d (search timer '%s'); VPS used: %s", Name, Device->CardIndex(), search->search, vpsUsed ? "Yes": "No"); const cEvent* event = ti->Event(); if (!event) { @@ -92,7 +93,7 @@ void cRecStatusMonitor::Recording(const cDevice *Device, const char *Name, const continue; } time_t now = time(NULL); - if (now < ti->StartTime() + 60) // allow a delay of one minute + if (vpsUsed || now < ti->StartTime() + 60) // allow a delay of one minute { timerObj->recDone = new cRecDone(ti, event, search); return; @@ -137,15 +138,15 @@ void cRecStatusMonitor::Recording(const cDevice *Device, const char *Name, const int recLen = RecLengthInSecs(pRecording); recFraction = double(recLen) * 100 / timerLengthSecs; } - - if (now < tiR->timer->StopTime() || recFraction < 98) // assure timer has reached its end or at least 98% were recorded + bool vpsUsed = tiR->timer->HasFlags(tfVps) && tiR->timer->Event() && tiR->timer->Event()->Vps(); + if ((!vpsUsed && now < tiR->timer->StopTime()) || recFraction < (vpsUsed ? 90: 98)) // assure timer has reached its end or at least 98% were recorded { complete = false; - LogFile.Log(1,"finished: '%s' (not complete! - recorded only %d%%); search timer: '%s'", tiR->timer->File(), recFraction, search->search); + LogFile.Log(1,"finished: '%s' (not complete! - recorded only %d%%); search timer: '%s'; VPS used: %s", tiR->timer->File(), recFraction, search->search, vpsUsed ? "Yes": "No"); } else { - LogFile.Log(1,"finished: '%s'; search timer: '%s'", tiR->timer->File(), search->search); + LogFile.Log(1,"finished: '%s'; search timer: '%s'; VPS used: %s", tiR->timer->File(), search->search, vpsUsed ? "Yes": "No"); if (recFraction < 100) LogFile.Log(2,"recorded %d%%'", recFraction); } -- cgit v1.2.3