timeshift detection for remote timers

This commit is contained in:
louis
2016-06-12 11:02:28 +02:00
parent 49823486f6
commit a9cbdf00fe
3 changed files with 23 additions and 0 deletions

View File

@@ -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();

View File

@@ -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);