X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/86e9af6a8a52226e0dc08430fb4b03291f9de0c7..064515cf022f9ec6197c355b259960f5cb5d731e:/lib/service/event.cpp diff --git a/lib/service/event.cpp b/lib/service/event.cpp index 8a75b9e9..2d0f83a4 100644 --- a/lib/service/event.cpp +++ b/lib/service/event.cpp @@ -163,6 +163,7 @@ RESULT eServiceEvent::parseFrom(Event *evt, int tsidonid) (stime_bcd >> 8)&0xFF, stime_bcd & 0xFF ); + m_event_id = evt->getEventId(); m_duration = fromBCD(duration>>16)*3600+fromBCD(duration>>8)*60+fromBCD(duration); std::string country="de_DE"; // TODO use local data here for (int i=0; i < MAX_LANG; i++) @@ -203,7 +204,7 @@ RESULT eServiceEvent::getComponentData(ePtr &dest, int tagnum) c return -1; } -RESULT eServiceEvent::getLinkageService(eServiceReference &service, int num) const +RESULT eServiceEvent::getLinkageService(eServiceReference &service, eServiceReference &parent, int num) const { std::list::const_iterator it = m_linkage_services.begin(); @@ -212,6 +213,25 @@ RESULT eServiceEvent::getLinkageService(eServiceReference &service, int num) con if ( it != m_linkage_services.end() ) { service = *it; + eServiceReferenceDVB &subservice = (eServiceReferenceDVB&) service; + eServiceReferenceDVB ¤t = (eServiceReferenceDVB&) parent; + subservice.setDVBNamespace(current.getDVBNamespace()); + if ( current.getParentTransportStreamID().get() ) + { + subservice.setParentTransportStreamID( current.getParentTransportStreamID() ); + subservice.setParentServiceID( current.getParentServiceID() ); + } + else + { + subservice.setParentTransportStreamID( current.getTransportStreamID() ); + subservice.setParentServiceID( current.getServiceID() ); + } + if ( subservice.getParentTransportStreamID() == subservice.getTransportStreamID() && + subservice.getParentServiceID() == subservice.getServiceID() ) + { + subservice.setParentTransportStreamID( eTransportStreamID(0) ); + subservice.setParentServiceID( eServiceID(0) ); + } return 0; } service.type = eServiceReference::idInvalid;