summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--HISTORY.DE2
-rw-r--r--epgsearchext.c4
-rw-r--r--menu_whatson.c28
-rw-r--r--searchtimer_thread.c38
-rw-r--r--searchtimer_thread.h2
6 files changed, 31 insertions, 45 deletions
diff --git a/HISTORY b/HISTORY
index 40fe05f..82f793f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -23,6 +23,8 @@ new:
- Commit 0004-some-small-fixes.diff by TomJoad@vdr-portal.de
http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1291452-epgsearch-f%C3%BCr-vdr-2-3-x/#post1291452
- Drop legacy code prior VDR 2.3.x
+- Commit 0001-fixed-unresponsive-vdr.diff by TomJoad@vdr-portal.de
+ http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1291771-epgsearch-f%C3%BCr-vdr-2-3-x/#post1291771
2013-03-xx; Version 1.0.1 - maintenance release
new:
diff --git a/HISTORY.DE b/HISTORY.DE
index f1c6578..40653ec 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -23,6 +23,8 @@ neu:
- Anwenden 0004-some-small-fixes.diff von TomJoad@vdr-portal.de
http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1291452-epgsearch-f%C3%BCr-vdr-2-3-x/#post1291452
- Löschen Alt-Code vor VDR 2.3.x
+- Anwenden 0001-fixed-unresponsive-vdr.diff von TomJoad@vdr-portal.de
+ http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1291771-epgsearch-f%C3%BCr-vdr-2-3-x/#post1291771
2013-03-xx: Version 1.0.1 - Maintenance Release
neu:
diff --git a/epgsearchext.c b/epgsearchext.c
index af72977..98afd94 100644
--- a/epgsearchext.c
+++ b/epgsearchext.c
@@ -1171,8 +1171,6 @@ void cSearchExt::CheckRepeatTimers(cSearchResults* pResults)
}
cSearchResult* pResultObj = NULL;
- LOCK_TIMERS_READ;
- const cTimers* vdrtimers = Timers;
for (pResultObj = pResults->First(); pResultObj; pResultObj = pResults->Next(pResultObj))
{
if ((action != searchTimerActionRecord) && (action != searchTimerActionInactiveRecord)) // only announce if there is no timer for the event
@@ -1261,7 +1259,7 @@ void cSearchExt::CheckRepeatTimers(cSearchResults* pResults)
}
}
bool dummy;
- const cTimer* timer = cSearchTimerThread::GetTimer(vdrtimers, this, pEvent, dummy);
+ const cTimer* timer = cSearchTimerThread::GetTimer(this, pEvent, dummy);
if (timer && !timer->HasFlags(tfActive))
{
LogFile.Log(3,"skip '%s~%s' (%s - %s, channel %d), existing timer disabled", pEvent->Title()?pEvent->Title():"no title", pEvent->ShortText()?pEvent->ShortText():"no subtitle", GETDATESTRING(pEvent), GETTIMESTRING(pEvent), ChannelNrFromEvent(pEvent));
diff --git a/menu_whatson.c b/menu_whatson.c
index fa55408..42aa377 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -81,9 +81,8 @@ bool cMenuMyScheduleItem::Update(bool Force)
bool OldInSwitchList = inSwitchList;
bool hasMatch = false;
const cTimer* timer = NULL;
- LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
- if (event) timer = vdrtimers->GetMatch(event, &timerMatch);
+ LOCK_TIMERS_READ;
+ if (event) timer = Timers->GetMatch(event, &timerMatch);
if (event) inSwitchList = (SwitchTimers.InSwitchList(event)!=NULL);
if (timer) hasMatch = true;
@@ -237,7 +236,7 @@ bool cMenuMyScheduleItem::Update(bool Force)
SetText(buffer, false);
- if (gl_InfoConflict == 0 && EPGSearchConfig.checkTimerConflAfterTimerProg && !Force && timer && timerMatch && timerMatch != OldTimerMatch)
+ if (gl_InfoConflict == 0 && EPGSearchConfig.checkTimerConflAfterTimerProg && !Force && timer && timerMatch && timerMatch != OldTimerMatch && !(timer->Remote()))
{
cConflictCheck C;
C.Check();
@@ -426,8 +425,7 @@ void cMenuWhatsOnSearch::LoadSchedules()
maxChannel = 0;
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- for (const cChannel *Channel = vdrchannels->First(); Channel; Channel = vdrchannels->Next(Channel))
+ for (const cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel))
{
if (!Channel->GroupSep())
{
@@ -568,11 +566,10 @@ eOSState cMenuWhatsOnSearch::Record(void)
{
LOCK_TIMERS_WRITE;
Timers->SetExplicitModify();
- cTimers *vdrtimers = Timers;
if (item->timerMatch == tmFull)
{
eTimerMatch tm = tmNone;
- cTimer *timer = vdrtimers->GetMatch(item->event, &tm);
+ cTimer *timer = Timers->GetMatch(item->event, &tm);
if (timer)
{
if (EPGSearchConfig.useVDRTimerEditMenu)
@@ -591,7 +588,7 @@ eOSState cMenuWhatsOnSearch::Record(void)
else
timer = new cTimer(false, false, item->channel);
- cTimer *t = vdrtimers->GetTimer(timer);
+ cTimer *t = Timers->GetTimer(timer);
if (EPGSearchConfig.onePressTimerCreation == 0 || t || !item->event || (!t && item->event && item->event->StartTime() - (Setup.MarginStart+2) * 60 < time(NULL)))
{
if (t)
@@ -630,7 +627,7 @@ eOSState cMenuWhatsOnSearch::Record(void)
SetAux(timer, fullaux);
if (*Setup.SVDRPDefaultHost)
timer->SetRemote(Setup.SVDRPDefaultHost);
- vdrtimers->Add(timer);
+ Timers->Add(timer);
if (!HandleRemoteTimerModifications(timer)) {
delete timer;
ERROR("Epgsearch: RemoteTimerModifications failed");
@@ -638,7 +635,7 @@ eOSState cMenuWhatsOnSearch::Record(void)
else {
gl_timerStatusMonitor->SetConflictCheckAdvised();
timer->Matches();
- vdrtimers->SetModified();
+ Timers->SetModified();
LogFile.iSysLog("timer %s added (active)", *timer->ToDescr());
}
@@ -735,8 +732,7 @@ eOSState cMenuWhatsOnSearch::Shift(int iMinutes)
{
currentChannel = mi->channel->Number();
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- scheduleChannel = vdrchannels->GetByNumber(currentChannel);
+ scheduleChannel = Channels->GetByNumber(currentChannel);
}
LoadSchedules();
Display();
@@ -753,8 +749,7 @@ eOSState cMenuWhatsOnSearch::ShowSummary()
if (ei)
{
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(ei->ChannelID(), true, true);
+ const cChannel *channel = Channels->GetByChannelID(ei->ChannelID(), true, true);
if (channel)
return AddSubMenu(new cMenuEventSearch(ei, eventObjects, SurfModeChannel));
}
@@ -880,8 +875,7 @@ eOSState cMenuWhatsOnSearch::ProcessKey(eKeys Key)
{
currentChannel = mi->channel->Number();
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- scheduleChannel = vdrchannels->GetByNumber(currentChannel);
+ scheduleChannel = Channels->GetByNumber(currentChannel);
}
}
else
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index a99e65f..76e7509 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -99,11 +99,11 @@ void cSearchTimerThread::Stop(void) {
}
-const cTimer *cSearchTimerThread::GetTimer(const cTimers* vdrtimers, cSearchExt *searchExt, const cEvent *pEvent, bool& bTimesMatchExactly)
+const cTimer *cSearchTimerThread::GetTimer(cSearchExt *searchExt, const cEvent *pEvent, bool& bTimesMatchExactly)
{
+ LOCK_TIMERS_READ;
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(pEvent->ChannelID(), true, true);
+ const cChannel *channel = Channels->GetByChannelID(pEvent->ChannelID(), true, true);
if (!channel)
return NULL;
@@ -131,7 +131,7 @@ const cTimer *cSearchTimerThread::GetTimer(const cTimers* vdrtimers, cSearchExt
tm *tmStartEv = localtime_r(&eStart, &tm_r);
- for (const cTimer *ti = vdrtimers->First(); ti; ti = vdrtimers->Next(ti))
+ for (const cTimer *ti = Timers->First(); ti; ti = Timers->Next(ti))
{
if (ti->Channel() != channel)
continue;
@@ -255,8 +255,7 @@ void cSearchTimerThread::Action(void)
}
{
LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
- pOutdatedTimers = searchExt->GetTimerList(vdrtimers, pOutdatedTimers);
+ pOutdatedTimers = searchExt->GetTimerList(Timers, pOutdatedTimers);
} // End of Block should release ReadLock
cSearchResults* pSearchResults = searchExt->Run(-1, true);
@@ -281,8 +280,7 @@ void cSearchTimerThread::Action(void)
{
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(pEvent->ChannelID(), true, true);
+ const cChannel *channel = Channels->GetByChannelID(pEvent->ChannelID(), true, true);
if (!channel)
continue;
}
@@ -313,10 +311,7 @@ void cSearchTimerThread::Action(void)
// search for an already existing timer
bool bTimesMatchExactly = false;
const cTimer *t = NULL;
- {
- LOCK_TIMERS_READ;
- t = GetTimer(Timers,searchExt, pEvent, bTimesMatchExactly);
- }
+ t = GetTimer(searchExt, pEvent, bTimesMatchExactly);
char* Summary = NULL;
uint timerMod = tmNoChange;
@@ -512,8 +507,7 @@ void cSearchTimerThread::Action(void)
bool found = false;
{
LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
- for(const cTimer* checkT = vdrtimers->First(); checkT; checkT = vdrtimers->Next(checkT))
+ for(const cTimer* checkT = Timers->First(); checkT; checkT = Timers->Next(checkT))
if (checkT == t)
{
found = true;
@@ -799,9 +793,8 @@ void cSearchTimerThread::CheckExpiredRecs()
{
LogFile.Log(1, "check for expired recordings started");
LOCK_RECORDINGS_WRITE;
- cRecordings *vdrrecordings = Recordings;
cList<cRecordingObj> DelRecordings;
- for (cRecording *recording = vdrrecordings->First(); recording && m_Active; recording = vdrrecordings->Next(recording))
+ for (cRecording *recording = Recordings->First(); recording && m_Active; recording = Recordings->Next(recording))
{
LogFile.Log(3, "check recording %s from %s for expiration", recording->Name(), DAYDATETIME(recording->Start()));
if (recording->Start() == 0)
@@ -858,7 +851,7 @@ void cSearchTimerThread::CheckExpiredRecs()
if (!recording->Delete())
LogFile.Log(1, "error deleting recording!");
else
- vdrrecordings->DelByName(recording->FileName());
+ Recordings->DelByName(recording->FileName());
}
else
LogFile.Log(1, "recording already in use by a timer!");
@@ -909,11 +902,9 @@ void cSearchTimerThread::CheckManualTimers(void)
LogFile.Log(1, "manual timer check started");
LOCK_TIMERS_READ;
- const cTimers *vdrtimers = Timers;
LOCK_SCHEDULES_READ;
- const cSchedules *schedules = Schedules;
- for (const cTimer *ti = vdrtimers->First(); ti && m_Active; ti = vdrtimers->Next(ti))
+ for (const cTimer *ti = Timers->First(); ti && m_Active; ti = Timers->Next(ti))
{
if (TriggeredFromSearchTimerID(ti) != -1) continue; // manual timer?
@@ -935,7 +926,7 @@ void cSearchTimerThread::CheckManualTimers(void)
if (updateMethod && atoi(updateMethod) == UPD_EVENTID) // by event ID?
{
// get the channels schedule
- const cSchedule* schedule = schedules->GetSchedule(ti->Channel());
+ const cSchedule* schedule = Schedules->GetSchedule(ti->Channel());
if (schedule)
{
tEventID eventID = 0;
@@ -958,7 +949,7 @@ void cSearchTimerThread::CheckManualTimers(void)
if (updateMethod && atoi(updateMethod) == UPD_CHDUR) // by channel and time?
{
// get the channels schedule
- const cSchedule* schedule = schedules->GetSchedule(ti->Channel());
+ const cSchedule* schedule = Schedules->GetSchedule(ti->Channel());
if (schedule)
{
// collect all events touching the old timer margins
@@ -1024,7 +1015,6 @@ void cSearchTimerThread::CheckEPGHours()
time_t checkTime = time(NULL) + EPGSearchConfig.checkEPGHours * 60 * 60;
LOCK_SCHEDULES_READ;
- const cSchedules *schedules = Schedules;
cChannelGroup channelsWithSmallEPG;
cChannelGroupItem* channelInGroup = channelGroup->channels.First();
@@ -1032,7 +1022,7 @@ void cSearchTimerThread::CheckEPGHours()
{
const cChannel* channel = channelInGroup->channel;
// get the channels schedule
- const cSchedule* schedule = schedules->GetSchedule(channel);
+ const cSchedule* schedule = Schedules->GetSchedule(channel);
if (!schedule || !schedule->GetEventAround(checkTime))
{
LogFile.Log(3,"less than %d hours of EPG for channel %s!", EPGSearchConfig.checkEPGHours, channel->Name());
diff --git a/searchtimer_thread.h b/searchtimer_thread.h
index fe8d6dd..ddf8b85 100644
--- a/searchtimer_thread.h
+++ b/searchtimer_thread.h
@@ -61,7 +61,7 @@ class cSearchTimerThread: public cThread {
static cSearchResults announceList;
static char* SummaryExtended(cSearchExt* searchExt, const cTimer* Timer, const cEvent* pEvent);
static cSearchTimerThread *m_Instance;
- static const cTimer* GetTimer(const cTimers* vdrtimers, cSearchExt *searchExt, const cEvent *pEvent, bool& bTimesMatchExactly);
+ static const cTimer* GetTimer(cSearchExt *searchExt, const cEvent *pEvent, bool& bTimesMatchExactly);
static bool justRunning;
cSearchTimerThread(cPluginEpgsearch* thePlugin);