diff options
| author | louis <louis.braun@gmx.de> | 2016-06-12 11:02:28 +0200 |
|---|---|---|
| committer | louis <louis.braun@gmx.de> | 2016-06-12 11:02:28 +0200 |
| commit | a9cbdf00fea484c519c93c5eca16ea782ea7fed0 (patch) | |
| tree | 560ce1556f2dfe9086a11e4c82e5d6b67e96e717 /extensions | |
| parent | 49823486f6a092fdc2b72fdf583eacc8c49149af (diff) | |
| download | vdr-plugin-skindesigner-a9cbdf00fea484c519c93c5eca16ea782ea7fed0.tar.gz vdr-plugin-skindesigner-a9cbdf00fea484c519c93c5eca16ea782ea7fed0.tar.bz2 | |
timeshift detection for remote timers
Diffstat (limited to 'extensions')
| -rw-r--r-- | extensions/globaltimers.c | 16 | ||||
| -rw-r--r-- | extensions/globaltimers.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/extensions/globaltimers.c b/extensions/globaltimers.c index c6b483c..1d8092f 100644 --- a/extensions/globaltimers.c +++ b/extensions/globaltimers.c @@ -167,6 +167,22 @@ const char* cGlobalTimers::RemoteHost(int i) { return "";
}
+bool cGlobalTimers::IsRecording(const cRecording *rec) {
+ if (!rec || !rec->Name())
+ return false;
+ std::string recName = rec->Name();
+ int size = Size();
+ for (int i=0; i<size; i++) {
+ const cTimer *t = At(i);
+ const char *timerFile = t->File();
+ if (!t->Matches() || !timerFile)
+ continue;
+ if (recName.find(timerFile) != std::string::npos)
+ return true;
+ }
+ return false;
+}
+
void cGlobalTimers::ClearTimers(void) {
if (isEpg2VdrTimers) {
int size = Size();
diff --git a/extensions/globaltimers.h b/extensions/globaltimers.h index 9f722d8..91f3bdc 100644 --- a/extensions/globaltimers.h +++ b/extensions/globaltimers.h @@ -27,6 +27,7 @@ class cGlobalTimers : public cVector<const cTimer *> { int NumTimerConfilicts(void);
bool IsRemoteTimer(int i);
const char* RemoteHost(int i);
+ bool IsRecording(const cRecording *rec);
void ClearTimers(void);
static void StartRefreshThread(void);
static void StopRefreshThread(void);
|
