+
+ def addServiceToList(self, service, type, vList):
+ #Replaces addWhitelistService and addBlacklistService
+ #The lists are not only lists of service references any more.
+ #They are named lists with the service as key and an array of types as value:
+
+ if vList.has_key(service):
+ if not type in vList[service]:
+ vList[service].append(type)
+ else:
+ vList[service] = [type]
+
+ def removeServiceFromList(self, service, type, vList):
+ #Replaces deleteWhitelistService and deleteBlacklistService
+ if vList.has_key(service):
+ if type in vList[service]:
+ vList[service].remove(type)
+ if not vList[service]:
+ del vList[service]
+ if self.serviceLevel.has_key(service):
+ self.serviceLevel.remove(service)
+
+ def readServicesFromBouquet(self,sBouquetSelection,formatstring):
+ #This method gives back a list of services for a given bouquet
+ from enigma import eServiceCenter, eServiceReference
+ from Screens.ChannelSelection import service_types_tv
+ serviceHandler = eServiceCenter.getInstance()
+ refstr = sBouquetSelection
+ root = eServiceReference(refstr)
+ list = serviceHandler.list(root)
+ if list is not None:
+ services = list.getContent("CN", True) #(servicecomparestring, name)
+ return services