- timer = self.timerlist[event[1]]
- if event[2] == self.bflag:
- fakeRecService = NavigationInstance.instance.recordService(timer.service_ref)
- feinfo = fakeRecService.frontendInfo().getFrontendData()
- tunerType = feinfo.get("tuner_type")
- tunerSlot = feinfo.get("tuner_number")
- if event[1] == -1: # new timer
+ timer = self.timerlist[event[2]]
+ if event[1] == self.bflag:
+ tunerType = [ ]
+ fakeRecService = NavigationInstance.instance.recordService(timer.service_ref, True)
+ if fakeRecService:
+ fakeRecResult = fakeRecService.start(True)
+ else:
+ fakeRecResult = -1
+ if not fakeRecResult: # tune okay
+ feinfo = fakeRecService.frontendInfo().getFrontendData()
+ tunerType.append(feinfo.get("tuner_type"))
+ else: # tune failed.. so we must go another way to get service type (DVB-S, DVB-T, DVB-C)
+
+ def getServiceType(ref): # helper function to get a service type of a service reference
+ serviceInfo = serviceHandler.info(ref)
+ serviceInfo = serviceInfo and serviceInfo.getInfoObject(ref, iServiceInformation.sTransponderData)
+ return serviceInfo and serviceInfo["tuner_type"] or ""
+
+ ref = timer.service_ref.ref
+ if ref.flags & eServiceReference.isGroup: # service group ?
+ serviceList = serviceHandler.list(ref) # get all alternative services
+ if serviceList:
+ for ref in serviceList.getContent("R"): # iterate over all group service references
+ type = getServiceType(ref)
+ if not type in tunerType: # just add single time
+ tunerType.append(type)
+ else:
+ tunerType.append(getServiceType(ref))
+
+ if event[2] == -1: # new timer