コード例 #1
0
    def P_getallservices(self, request):
        self.isGZ = True
        type = "tv"
        if "type" in request.args.keys():
            type = "radio"
        if not config.ModernWebif.xbmcservices.value:
            # NEW : use url parameter instead of setting
            if "renameserviceforxmbc" in request.args.keys():
                bouquets = getAllServices(type)
                count = 0
                for bouquet in bouquets["services"]:
                    for service in bouquet["subservices"]:
                        service["servicename"] = "%d - %s" % (
                            count + 1, service["servicename"])
                        count += 1
                return bouquets

        # TODO : remove this if the setting is removed
        if not config.ModernWebif.xbmcservices.value:
            return getAllServices(type)

        # TODO : remove this if the setting is removed
        # rename services for xbmc
        bouquets = getAllServices(type)
        count = 0
        for bouquet in bouquets["services"]:
            for service in bouquet["subservices"]:
                service["servicename"] = "%d - %s" % (count + 1,
                                                      service["servicename"])
                count += 1
        return bouquets
コード例 #2
0
	def P_getallservices(self, request):
		self.isGZ=True
		type = "tv"
		if "type" in request.args.keys():
			type = "radio"
# NEW : use url parameter instead of setting
		if "renameserviceforxmbc" in request.args.keys():
			bouquets = getAllServices(type)
			count = 0
			for bouquet in bouquets["services"]:
				for service in bouquet["subservices"]:
					service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
					count += 1
			return bouquets
		
# TODO : remove this if the setting is removed
		if not config.OpenWebif.xbmcservices.value:
			return getAllServices(type)

# TODO : remove this if the setting is removed
		# rename services for xbmc
		bouquets = getAllServices(type)
		count = 0
		for bouquet in bouquets["services"]:
			for service in bouquet["subservices"]:
				service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
				count += 1
		return bouquets
コード例 #3
0
	def P_getallservices(self, request):
		if not config.OpenWebif.xbmcservices.value:
			return getAllServices()
			
		# rename services for xbmc
		bouquets = getAllServices()
		count = 0
		for bouquet in bouquets["services"]:
			for service in bouquet["subservices"]:
				service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
				count += 1
		return bouquets
コード例 #4
0
	def P_getallservices(self, request):
		if not config.OpenWebif.xbmcservices.value:
			return getAllServices()
			
		# rename services for xbmc
		bouquets = getAllServices()
		count = 0
		for bouquet in bouquets["services"]:
			for service in bouquet["subservices"]:
				service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
				count += 1
		return bouquets
コード例 #5
0
ファイル: web.py プロジェクト: sakuwa/e2openplugin-OpenWebif
	def P_getallservices(self, request):
		type = "tv"
		if "type" in request.args.keys():
			type = "radio"
		if not config.OpenWebif.xbmcservices.value:
			return getAllServices(type)

		# rename services for xbmc
		bouquets = getAllServices()
		count = 0
		for bouquet in bouquets["services"]:
			for service in bouquet["subservices"]:
				service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
				count += 1
		self.isGZ=True
		return bouquets
コード例 #6
0
ファイル: web.py プロジェクト: lprot/e2openplugin-OpenWebif
	def P_getallservices(self, request):
		type = "tv"
		if "type" in request.args.keys():
			type = "radio"
		bouquets = getAllServices(type)
		if "renameserviceforxmbc" in request.args.keys():
			for bouquet in bouquets["services"]:
				for service in bouquet["subservices"]:
					if not int(service["servicereference"].split(":")[1]) & 64:
						service["servicename"] = "%d - %s" % (service["pos"], service["servicename"])
			return bouquets
		return bouquets
コード例 #7
0
ファイル: web.py プロジェクト: svox1/e2openplugin-OpenWebif
	def P_getallservices(self, request):
		self.isGZ=True
		type = "tv"
		if "type" in request.args.keys():
			type = "radio"
# NEW : use url parameter instead of setting
		if "renameserviceforxmbc" in request.args.keys():
			bouquets = getAllServices(type)
			count = 0
			for bouquet in bouquets["services"]:
				for service in bouquet["subservices"]:
					service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
					count += 1
			return bouquets

		bouquets = getAllServices(type)
		count = 0
		for bouquet in bouquets["services"]:
			for service in bouquet["subservices"]:
				service["servicename"] = "%d - %s" % (count + 1, service["servicename"])
				count += 1
		return bouquets
コード例 #8
0
ファイル: web.py プロジェクト: GeirJ/e2openplugin-OpenWebif
	def P_getallservices(self, request):
		self.isGZ=True
		type = "tv"
		if "type" in request.args.keys():
			type = "radio"
		bouquets = getAllServices(type)
		if "renameserviceforxmbc" in request.args.keys():
			for bouquet in bouquets["services"]:
				for service in bouquet["subservices"]:
					if not int(service["servicereference"].split(":")[1]) & 64:
						service["servicename"] = "%d - %s" % (service["pos"], service["servicename"])
			return bouquets
		return bouquets