Hallo horchi
ich versuche gerade, aus einem Plugin heraus mich an die VDR EPG Events anzuhängen um damit die VPS Start und Stopp Zeiten herauszubekommen.
Ohne epg2vdr Plugin funktioniert dieser Code (vollständiger Code: git clone -b V02-vps https://github.com/kfb77/vdr-plugin-markad
bool cEpgHandlerMarkad::HandleEvent(cEvent *Event) {
StatusMarkAd->SetEPGStatus(Event->EventID(), Event->RunningStatus(), Event->IsRunning());
return(false);
}
void cStatusMarkAd::SetEPGStatus(const tEventID eventID, const int runningStatus, const int isRunning) {
if (max_recs == -1) return;
for (int i = 0; i <= max_recs; i++) {
if (recs[i].eventID == eventID) {
dsyslog("markad: recording %s got event RunningStatus %i IsRunning %i", recs[i].Name, runningStatus, isRunning);
if ((recs[i].runningStatus == 0) && (runningStatus == 4)) {
dsyslog("markad: recording %s got VPS start event", recs[i].Name);
recs[i].runningStatus = 4;
}
if ((recs[i].runningStatus == 4) && (runningStatus == 0)) {
dsyslog("markad: recording %s got VPS stop event", recs[i].Name);
recs[i].runningStatus = 0;
}
if ((runningStatus != 0) && (runningStatus != 4)) {
dsyslog("markad: recording %s got unsuported event status %i", recs[i].Name, runningStatus);
}
break;
}
}
}
Alles anzeigen
Beim Start einer Aufnahme bekomme ich:
May 17 10:42:19 VDR-Dev vdr: [284986] markad: recording Immer wieder sonntags (3/16) got event RunningStatus 4 IsRunning 1
May 17 10:42:19 VDR-Dev vdr: [284986] markad: recording Immer wieder sonntags (3/16) got VPS start Event
Es funktioniert auch mit aktiven epg2vdr Plugin, solange der Kanal nicht in der Channel Map definiert wurde. Ist der das aber, bekomme ich nichts mehr.
Mein Plugin hänge ich vor epg2vdr in den VDR Event Handler ein, das bringt aber auch nichts.
Ich kann nicht wirklich erkennen, wo das hängt. Hast du eine Idee, warum der VDR die beiden Werte nicht mehr setzt, wenn epg2vdr bei dem Kanal aktiv ist ?