From b5cf08c390c12ecc2be232fa336311fa4c73c541 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Thu, 9 Jul 2009 19:50:54 +0200 Subject: ignore manual timers in the update check that were edited by the user --- HISTORY | 2 ++ HISTORY.DE | 2 ++ menu_myedittimer.c | 5 +++++ searchtimer_thread.c | 8 +++++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 95e3819..fa26454 100644 --- a/HISTORY +++ b/HISTORY @@ -50,6 +50,8 @@ new: - the first run of the background threads (searchtimer, switchtimer, conflict check) is now triggered by the first call to cPlugin::MainThreadHook instead of waiting 20s after VDRs startup. +- The update check for manual timers does now ignore timers whose start or stop time was edited + by the user. fixes: - fixed a crash when pressing 'Ok' in an empty timers done menu diff --git a/HISTORY.DE b/HISTORY.DE index b29d7b1..4209021 100644 --- a/HISTORY.DE +++ b/HISTORY.DE @@ -54,6 +54,8 @@ neu: 'v' statt 'V' angezeigt. - Der erste Lauf der Hintergrund-Threads (Suchtimer, Umschalttimer, Konfliktprüfung) wird nun durch den ersten Aufruf von cPlugin::MainThreadHook ausgelöst, anstatt 20s nach dem VDR-Start. +- Die Überwachung manueller Timer ignoriert nun Timer, deren Start- oder Stopzeit vom Anwender + geändert wurde. fixes: - Absturz beim Drücken von 'Ok' in leerem Menü erledigter Timer behoben diff --git a/menu_myedittimer.c b/menu_myedittimer.c index 6445ab5..a8854ee 100644 --- a/menu_myedittimer.c +++ b/menu_myedittimer.c @@ -357,6 +357,11 @@ eOSState cMenuMyEditTimer::ProcessKey(eKeys Key) aux = UpdateAuxValue(aux, "eventid", event->EventID()); aux = UpdateAuxValue(aux, "bstart", bstart); aux = UpdateAuxValue(aux, "bstop", bstop); + if (addIfConfirmed) // do not update start and stop time in aux if this is an existing timer, we need this to detect manual editing + { + aux = UpdateAuxValue(aux, "start", startTime); + aux = UpdateAuxValue(aux, "stop", stopTime); + } fullaux = UpdateAuxValue(fullaux, "epgsearch", aux); } diff --git a/searchtimer_thread.c b/searchtimer_thread.c index 1a3fed1..2dbc7df 100644 --- a/searchtimer_thread.c +++ b/searchtimer_thread.c @@ -855,7 +855,13 @@ void cSearchTimerThread::CheckManualTimers() for (cTimer *ti = Timers.First(); ti && m_Active; ti = Timers.Next(ti)) { if (TriggeredFromSearchTimerID(ti) != -1) continue; // manual timer? - + + if (TimerWasModified(ti)) + { + LogFile.Log(2,"timer for '%s' (%s, channel %s) modified by user - won't be touched", ti->File(), DAYDATETIME(ti->StartTime()), CHANNELNAME(ti->Channel())); + continue; // don't update timers modified by user + } + char* szbstart = GetAuxValue(ti, "bstart"); int bstart = szbstart? atoi(szbstart) : 0; free(szbstart); -- cgit v1.2.3