summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomJoad <TomJoad@vdr-portal.de>2017-06-07 21:50:53 +0200
committerFrank Neumann <fnu@yavdr.org>2017-06-07 21:50:53 +0200
commita2e3e7d8e53ad43b1da09bf99c990a19cd947c56 (patch)
tree82607d13b785fcf39349639c12fdb618c50b08b8
parente7c0d492d5f31af5e0a00cd348a509179a8ad018 (diff)
downloadvdr-plugin-epgsearch-a2e3e7d8e53ad43b1da09bf99c990a19cd947c56.tar.gz
vdr-plugin-epgsearch-a2e3e7d8e53ad43b1da09bf99c990a19cd947c56.tar.bz2
Fixes in searchtimer thread.
-rw-r--r--searchtimer_thread.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index f50ab05..930ba99 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -139,6 +139,8 @@ const cTimer *cSearchTimerThread::GetTimer(cSearchExt *searchExt, const cEvent *
if (ti->WeekDays()) // ignore serial timers
continue;
+ if (ti->Remote()) // ignore remote timers
+ continue;
// ignore manual timers if this search could modify them
if ((searchExt->action == searchTimerActionRecord || searchExt->action == searchTimerActionInactiveRecord) && TriggeredFromSearchTimerID(ti) == -1) // manual timer
continue;
@@ -501,17 +503,11 @@ void cSearchTimerThread::Action(void)
{
const cTimer* t = tObj->timer;
// timer could have been deleted meanwhile, so check if its still there
- bool found = false;
{
LOCK_TIMERS_READ;
- for(const cTimer* checkT = Timers->First(); checkT; checkT = Timers->Next(checkT))
- if (checkT == t)
- {
- found = true;
- break;
- }
+ if (!Timers->Contains(t))
+ continue;
}
- if (!found) continue;
if (TimerWasModified(t)) continue;
if (!t->Event()) continue; // if there is no event, we keep the timer, since EPG could have been cleared
@@ -790,6 +786,7 @@ void cSearchTimerThread::CheckExpiredRecs()
{
LogFile.Log(1, "check for expired recordings started");
LOCK_RECORDINGS_WRITE;
+ Recordings->SetExplicitModify();
cList<cRecordingObj> DelRecordings;
for (cRecording *recording = Recordings->First(); recording && m_Active; recording = Recordings->Next(recording))
{
@@ -848,7 +845,10 @@ void cSearchTimerThread::CheckExpiredRecs()
if (!recording->Delete())
LogFile.Log(1, "error deleting recording!");
else
+ {
Recordings->DelByName(recording->FileName());
+ Recordings->SetModified();
+ }
}
else
LogFile.Log(1, "recording already in use by a timer!");