mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
timeshift detection for remote timers
This commit is contained in:
parent
49823486f6
commit
a9cbdf00fe
@ -91,6 +91,12 @@ void cSDDisplayReplay::SetTimeShiftValues(const cRecording *recording) {
|
|||||||
int usage = recording->IsInUse();
|
int usage = recording->IsInUse();
|
||||||
if (usage & ruTimer)
|
if (usage & ruTimer)
|
||||||
isTimeShift = true;
|
isTimeShift = true;
|
||||||
|
else {
|
||||||
|
cGlobalTimers globalTimers;
|
||||||
|
globalTimers.LoadTimers();
|
||||||
|
if (globalTimers.IsRecording(recording))
|
||||||
|
isTimeShift = true;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!isTimeShift)
|
if (!isTimeShift)
|
||||||
return;
|
return;
|
||||||
|
@ -167,6 +167,22 @@ const char* cGlobalTimers::RemoteHost(int i) {
|
|||||||
return "";
|
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) {
|
void cGlobalTimers::ClearTimers(void) {
|
||||||
if (isEpg2VdrTimers) {
|
if (isEpg2VdrTimers) {
|
||||||
int size = Size();
|
int size = Size();
|
||||||
|
@ -27,6 +27,7 @@ class cGlobalTimers : public cVector<const cTimer *> {
|
|||||||
int NumTimerConfilicts(void);
|
int NumTimerConfilicts(void);
|
||||||
bool IsRemoteTimer(int i);
|
bool IsRemoteTimer(int i);
|
||||||
const char* RemoteHost(int i);
|
const char* RemoteHost(int i);
|
||||||
|
bool IsRecording(const cRecording *rec);
|
||||||
void ClearTimers(void);
|
void ClearTimers(void);
|
||||||
static void StartRefreshThread(void);
|
static void StartRefreshThread(void);
|
||||||
static void StopRefreshThread(void);
|
static void StopRefreshThread(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user