summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--conflictcheck.c2
-rw-r--r--epgsearch.c6
-rw-r--r--epgsearchservices.h1
-rw-r--r--epgsearchtools.c2
-rw-r--r--menu_main.c2
-rw-r--r--menu_myedittimer.c2
-rw-r--r--menu_searchresults.c2
-rw-r--r--menu_whatson.c2
-rw-r--r--searchtimer_thread.c2
-rw-r--r--services.c6
-rw-r--r--services.h2
-rw-r--r--timer_thread.c4
13 files changed, 33 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 75cf973..2799c25 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ DEFINES4 += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN4)"'
### The object files (add further files here):
-OBJS = afuzzy.o blacklist.o changrp.o conflictcheck.o conflictcheck_thread.o distance.o $(PLUGIN).o epgsearchcats.o epgsearchcfg.o epgsearchext.o epgsearchsetup.o epgsearchsvdrp.o epgsearchtools.o i18n.o mail.o md5.o menu_announcelist.o menu_blacklistedit.o menu_blacklists.o menu_commands.o menu_conflictcheck.o menu_deftimercheckmethod.o menu_dirselect.o menu_event.o menu_favorites.o menu_main.o menu_myedittimer.o menu_quicksearch.o menu_recsdone.o menu_search.o menu_searchactions.o menu_searchedit.o menu_searchresults.o menu_searchtemplate.o menu_switchtimers.o menu_templateedit.o menu_timersdone.o menu_whatson.o noannounce.o rcfile.o recdone.o recstatus.o searchtimer_thread.o services.o switchtimer.o switchtimer_thread.o templatefile.o timer_thread.o timerdone.o uservars.o varparser.o
+OBJS = afuzzy.o blacklist.o changrp.o conflictcheck.o conflictcheck_thread.o distance.o $(PLUGIN).o epgsearchcats.o epgsearchcfg.o epgsearchext.o epgsearchsetup.o epgsearchsvdrp.o epgsearchtools.o i18n.o mail.o md5.o menu_announcelist.o menu_blacklistedit.o menu_blacklists.o menu_commands.o menu_conflictcheck.o menu_deftimercheckmethod.o menu_dirselect.o menu_event.o menu_favorites.o menu_main.o menu_myedittimer.o menu_quicksearch.o menu_recsdone.o menu_search.o menu_searchactions.o menu_searchedit.o menu_searchresults.o menu_searchtemplate.o menu_switchtimers.o menu_templateedit.o menu_timersdone.o menu_whatson.o noannounce.o rcfile.o recdone.o recstatus.o searchtimer_thread.o services.o switchtimer.o switchtimer_thread.o templatefile.o timer_thread.o timerdone.o timerstatus.o uservars.o varparser.o
ifdef HAVE_PCREPOSIX
LIBS += -L/usr/lib -lpcreposix -lpcre
diff --git a/conflictcheck.c b/conflictcheck.c
index d783f8a..cf12b41 100644
--- a/conflictcheck.c
+++ b/conflictcheck.c
@@ -28,6 +28,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include <libsi/si.h>
#include "conflictcheck_thread.h"
#include "recstatus.h"
+#include "timerstatus.h"
#define FULLMATCH 1000
#define EPGLIMITBEFORE (1 * 3600) // Time in seconds before a timer's start time and
@@ -215,6 +216,7 @@ void cConflictCheck::Check()
LogFile.Log(2,"timer '%s' (%s, channel %s) failed", (*it)->timer->File(), DAYDATETIME((*it)->timer->StartTime()), CHANNELNAME((*it)->timer->Channel()));
}
}
+ if (gl_timerStatusMonitor) gl_timerStatusMonitor->SetConflictCheckAdvised(false);
}
cList<cConflictCheckTimerObj>* cConflictCheck::CreateCurrentTimerList()
diff --git a/epgsearch.c b/epgsearch.c
index af1f61a..c1b18c7 100644
--- a/epgsearch.c
+++ b/epgsearch.c
@@ -47,6 +47,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "rcfile.h"
#include "changrp.h"
#include "recstatus.h"
+#include "timerstatus.h"
#include "recdone.h"
#include "blacklist.h"
#include "menu_search.h"
@@ -64,7 +65,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "menu_quicksearch.h"
#include "menu_announcelist.h"
-static const char VERSION[] = "0.9.24.beta19";
+static const char VERSION[] = "0.9.24.beta20";
static const char DESCRIPTION[] = trNOOP("search the EPG for repeats and more");
// globals
@@ -85,11 +86,13 @@ cPluginEpgsearch::cPluginEpgsearch(void)
showConflicts = false;
showAnnounces = false;
gl_recStatusMonitor = NULL;
+ gl_timerStatusMonitor = NULL;
}
cPluginEpgsearch::~cPluginEpgsearch()
{
delete gl_recStatusMonitor;
+ delete gl_timerStatusMonitor;
cSearchTimerThread::Exit();
cSwitchTimerThread::Exit();
cConflictCheckThread::Exit();
@@ -422,6 +425,7 @@ bool cPluginEpgsearch::Start(void)
LogFile.Open(AddDirectory(CONFIGDIR, "epgsearch.log"), Version());
gl_recStatusMonitor = new cRecStatusMonitor;
+ gl_timerStatusMonitor = new cTimerStatusMonitor;
SearchExtCats.Load(AddDirectory(CONFIGDIR, "epgsearchcats.conf"), true);
ChannelGroups.Load(AddDirectory(CONFIGDIR, "epgsearchchangrps.conf"), true);
diff --git a/epgsearchservices.h b/epgsearchservices.h
index 6e4de3e..51ea4c1 100644
--- a/epgsearchservices.h
+++ b/epgsearchservices.h
@@ -45,6 +45,7 @@ class cEpgsearchServiceHandler: public cServiceHandler
virtual std::string ReadSetupValue(const std::string& entry);
virtual bool WriteSetupValue(const std::string& entry, const std::string& value);
virtual std::list<std::string> TimerConflictList(bool relOnly=false);
+ virtual bool IsConflictCheckAdvised();
};
#endif
diff --git a/epgsearchtools.c b/epgsearchtools.c
index 6a740fa..5b3f8c1 100644
--- a/epgsearchtools.c
+++ b/epgsearchtools.c
@@ -37,6 +37,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "md5.h"
#include "afuzzy.h"
#include "i18n.h"
+#include "timerstatus.h"
#ifdef HAVE_PCREPOSIX
#include <pcreposix.h>
@@ -889,6 +890,7 @@ void DelTimer(int index)
cString cmdbuf = cString::sprintf("DELT %d", index);
LogFile.Log(2, "delete timer %d", index);
SendViaSVDRP(cmdbuf);
+ gl_timerStatusMonitor->SetConflictCheckAdvised();
}
char* FixSeparators(char* buffer, char sep)
diff --git a/menu_main.c b/menu_main.c
index 0465301..0c81699 100644
--- a/menu_main.c
+++ b/menu_main.c
@@ -37,6 +37,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "menu_conflictcheck.h"
#include "menu_favorites.h"
#include "menu_deftimercheckmethod.h"
+#include "timerstatus.h"
int toggleKeys=0;
int exitToMainMenu = 0;
@@ -209,6 +210,7 @@ eOSState cMenuSearchMain::Record(void)
SetAux(timer, fullaux);
Timers.Add(timer);
+ gl_timerStatusMonitor->SetConflictCheckAdvised();
timer->Matches();
Timers.SetModified();
LogFile.iSysLog("timer %s added (active)", *timer->ToDescr());
diff --git a/menu_myedittimer.c b/menu_myedittimer.c
index ffe86bb..7db0efe 100644
--- a/menu_myedittimer.c
+++ b/menu_myedittimer.c
@@ -32,6 +32,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "recstatus.h"
#include "uservars.h"
#include "menu_deftimercheckmethod.h"
+#include "timerstatus.h"
#include <math.h>
const char *cMenuMyEditTimer::CheckModes[3];
@@ -239,6 +240,7 @@ eOSState cMenuMyEditTimer::DeleteTimer()
}
LogFile.iSysLog("deleting timer %s", *timer->ToDescr());
Timers.Del(timer);
+ gl_timerStatusMonitor->SetConflictCheckAdvised();
cOsdMenu::Del(Current());
Timers.SetModified();
Display();
diff --git a/menu_searchresults.c b/menu_searchresults.c
index e7e7753..b1a1a3f 100644
--- a/menu_searchresults.c
+++ b/menu_searchresults.c
@@ -38,6 +38,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "uservars.h"
#include "menu_deftimercheckmethod.h"
#include "afuzzy.h"
+#include "timerstatus.h"
const char* ButtonBlue[3] = {NULL, NULL, NULL};
extern int gl_InfoConflict;
@@ -235,6 +236,7 @@ eOSState cMenuSearchResults::Record(void)
SetAux(timer, fullaux);
Timers.Add(timer);
+ gl_timerStatusMonitor->SetConflictCheckAdvised();
timer->Matches();
Timers.SetModified();
LogFile.iSysLog("timer %s added (active)", *timer->ToDescr());
diff --git a/menu_whatson.c b/menu_whatson.c
index ad54b3a..b8f6701 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -41,6 +41,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "menu_conflictcheck.h"
#include "templatefile.h"
#include "menu_deftimercheckmethod.h"
+#include "timerstatus.h"
#define HOURS(x) ((x)/100)
#define MINUTES(x) ((x)%100)
@@ -522,6 +523,7 @@ eOSState cMenuWhatsOnSearch::Record(void)
#endif
SetAux(timer, fullaux);
Timers.Add(timer);
+ gl_timerStatusMonitor->SetConflictCheckAdvised();
timer->Matches();
Timers.SetModified();
LogFile.iSysLog("timer %s added (active)", *timer->ToDescr());
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index 7a800c6..e33e3cb 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -39,6 +39,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "timer_thread.h"
#include "timerdone.h"
#include "menu_deftimercheckmethod.h"
+#include "timerstatus.h"
// priority for background thread
#define SEARCHTIMER_NICE 19
@@ -637,6 +638,7 @@ bool cSearchTimerThread::AddModTimer(cTimer* Timer, int index, cSearchExt* searc
tmpSummary?tmpSummary:"");
SendViaSVDRP(cmdbuf);
+ if (gl_timerStatusMonitor) gl_timerStatusMonitor->SetConflictCheckAdvised();
cTimerDone* timerdone = new cTimerDone(start, stop, pEvent, searchExt->ID);
if (index==0)
diff --git a/services.c b/services.c
index 0b55651..c9c5f00 100644
--- a/services.c
+++ b/services.c
@@ -35,6 +35,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "menu_dirselect.h"
#include "epgsearchtools.h"
#include "conflictcheck.h"
+#include "timerstatus.h"
std::list<std::string> cEpgsearchServiceHandler::SearchTimerList()
{
@@ -312,3 +313,8 @@ std::list<std::string> cEpgsearchServiceHandler::TimerConflictList(bool relOnly)
}
return list;
}
+
+bool cEpgsearchServiceHandler::IsConflictCheckAdvised()
+{
+ return gl_timerStatusMonitor?gl_timerStatusMonitor->ConflictCheckAdvised():false;
+}
diff --git a/services.h b/services.h
index 9f16c6c..b2bba12 100644
--- a/services.h
+++ b/services.h
@@ -154,6 +154,8 @@ class cServiceHandler
virtual bool WriteSetupValue(const std::string& entry, const std::string& value) = 0;
// Get timer conflicts
virtual std::list<std::string> TimerConflictList(bool relOnly=false) = 0;
+ // Check if a conflict check is advised
+ virtual bool IsConflictCheckAdvised() = 0;
};
struct Epgsearch_services_v1_0
diff --git a/timer_thread.c b/timer_thread.c
index d47df5f..09ba627 100644
--- a/timer_thread.c
+++ b/timer_thread.c
@@ -28,6 +28,7 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#include "epgsearchtools.h"
#include "services.h"
#include "svdrpclient.h"
+#include "timerstatus.h"
#include <vdr/tools.h>
#include <vdr/plugin.h>
@@ -95,7 +96,10 @@ void cTimerThread::Action(void)
delete service_data;
}
else
+ {
gl_TimerProgged = 1;
+ if (gl_timerStatusMonitor) gl_timerStatusMonitor->SetConflictCheckAdvised();
+ }
m_Active = false;
};
}