Ejemplo n.º 1
0
	def saveAll(self):
		for x in self["config"].list:
			x[1].save()

		FTA_only = []

		config_string = ""
		for provider in self.providers_order:
			if self.providers_configs[provider].value:
				if len(config_string) > 0:
					config_string += "|"

				provider_config = ProviderConfig()
				provider_config.unsetAllFlags()

				provider_config.setProvider(provider)
				if len(self.providers[provider]["bouquets"]) > 0:
					provider_config.setArea(self.providers_area[provider].value)

				if self.providers_makemain[provider] is None or self.providers_makemain[provider].value == "yes":
					provider_config.setMakeNormalMain()
				elif self.providers_makemain[provider].value == "hd":
					provider_config.setMakeHDMain()
				elif self.providers_makemain[provider].value == "ftahd":
					provider_config.setMakeFTAHDMain()
				elif self.providers_makemain[provider].value == "custom":
					provider_config.setMakeCustomMain()
					provider_config.setCustomFilename(self.providers_custommain[provider].value)

				if self.providers_makesections[provider] and self.providers_makesections[provider].value:
					provider_config.setMakeSections()

				if self.providers_makehd[provider] and self.providers_makehd[provider].value and (self.providers_makemain[provider] is None or self.providers_makemain[provider].value != "hd"):
					provider_config.setMakeHD()

				if self.providers_makefta[provider] and self.providers_makefta[provider].value and not self.providers_FTA_only[provider].value:
					provider_config.setMakeFTA()

				if self.providers_makeftahd[provider] and self.providers_makeftahd[provider].value and (self.providers_makemain[provider] is None or self.providers_makemain[provider].value != "ftahd") and not self.providers_FTA_only[provider].value:
					provider_config.setMakeFTAHD()

				if self.providers_swapchannels[provider] and self.providers_swapchannels[provider].value:
					provider_config.setSwapChannels()

				config_string += provider_config.serialize()

				if self.providers_FTA_only[provider].value:
					FTA_only.append(provider)

		# fta only
		config.autobouquetsmaker.FTA_only.value = ''
		if FTA_only:
			config.autobouquetsmaker.FTA_only.value = '|'.join(FTA_only)
		config.autobouquetsmaker.FTA_only.save()

		config.autobouquetsmaker.providers.value = config_string
		config.autobouquetsmaker.providers.save()
		configfile.save()
Ejemplo n.º 2
0
	def saveAll(self):
		for x in self["config"].list:
			x[1].save()
			
		FTA_only = []

		config_string = ""
		for provider in self.providers_order:
			if self.providers_configs[provider].value:
				if len(config_string) > 0:
					config_string += "|"

				provider_config = ProviderConfig()
				provider_config.unsetAllFlags()

				provider_config.setProvider(provider)
				if self.providers[provider]["protocol"] == "sky" or self.providers[provider]["protocol"] == "freesat" or self.providers[provider]["streamtype"] in ("dvbc", "dvbt"):
					provider_config.setArea(self.providers_area[provider].value)

				if self.providers_makemain[provider] is None or self.providers_makemain[provider].value == "yes":
					provider_config.setMakeNormalMain()
				elif self.providers_makemain[provider].value == "hd":
					provider_config.setMakeHDMain()
				elif self.providers_makemain[provider].value == "ftahd":
					provider_config.setMakeFTAHDMain()
				elif self.providers_makemain[provider].value == "custom":
					provider_config.setMakeCustomMain()
					provider_config.setCustomFilename(self.providers_custommain[provider].value)

				if self.providers_makesections[provider] and self.providers_makesections[provider].value:
					provider_config.setMakeSections()

				if self.providers_makehd[provider] and self.providers_makehd[provider].value and (self.providers_makemain[provider] is None or self.providers_makemain[provider].value != "hd") and self.providers[provider]["streamtype"] not in ("dvbt"):
					provider_config.setMakeHD()

				if self.providers_makefta[provider] and self.providers_makefta[provider].value and not self.providers_FTA_only[provider].value:
					provider_config.setMakeFTA()

				if self.providers_makeftahd[provider] and self.providers_makeftahd[provider].value and (self.providers_makemain[provider] is None or self.providers_makemain[provider].value != "ftahd") and self.providers[provider]["streamtype"] not in ("dvbt") and not self.providers_FTA_only[provider].value:
					provider_config.setMakeFTAHD()

				if self.providers_swapchannels[provider] and self.providers_swapchannels[provider].value and self.providers[provider]["streamtype"] not in ("dvbt"):
					provider_config.setSwapChannels()

				config_string += provider_config.serialize()
				
				if self.providers_FTA_only[provider].value:
					FTA_only.append(provider)

		# fta only
		config.autobouquetsmaker.FTA_only.value = ''
		if FTA_only:
			config.autobouquetsmaker.FTA_only.value = '|'.join(FTA_only)
		config.autobouquetsmaker.FTA_only.save()
		
		config.autobouquetsmaker.providers.value = config_string
		config.autobouquetsmaker.providers.save()
		configfile.save()
Ejemplo n.º 3
0
    def saveAll(self):
        for x in self["config"].list:
            x[1].save()

        config_string = ""
        for provider in self.providers_order:
            if self.providers_configs[provider].value:
                if len(config_string) > 0:
                    config_string += "|"

                provider_config = ProviderConfig()
                provider_config.unsetAllFlags()

                provider_config.setProvider(provider)
                if self.providers[provider][
                        "protocol"] == "sky" or self.providers[provider][
                            "protocol"] == "freesat" or self.providers[
                                provider]["streamtype"] in ("dvbc", "dvbt"):
                    provider_config.setArea(
                        self.providers_area[provider].value)

                if self.providers_makemain[
                        provider] is None or self.providers_makemain[
                            provider].value == "yes":
                    provider_config.setMakeNormalMain()
                elif self.providers_makemain[provider].value == "hd":
                    provider_config.setMakeHDMain()
                elif self.providers_makemain[provider].value == "custom":
                    provider_config.setMakeCustomMain()
                    provider_config.setCustomFilename(
                        self.providers_custommain[provider].value)

                if self.providers_makesections[
                        provider] and self.providers_makesections[
                            provider].value:
                    provider_config.setMakeSections()

                if self.providers_makehd[provider] and self.providers_makehd[
                        provider].value and (
                            self.providers_makemain[provider] is None or
                            self.providers_makemain[provider].value != "hd"):
                    provider_config.setMakeHD()

                if self.providers_makefta[provider] and self.providers_makefta[
                        provider].value:
                    provider_config.setMakeFTA()

                if self.providers_swapchannels[
                        provider] and self.providers_swapchannels[
                            provider].value:
                    provider_config.setSwapChannels()

                config_string += provider_config.serialize()

        config.autobouquetsmaker.providers.value = config_string
        config.autobouquetsmaker.providers.save()
        configfile.save()
Ejemplo n.º 4
0
	def saveAll(self):
		for x in self["config"].list:
			x[1].save()

		config_string = ""
		for provider in self.providers_order:
			if self.providers_configs[provider].value:
				if len(config_string) > 0:
					config_string += "|"

				provider_config = ProviderConfig()
				provider_config.unsetAllFlags()

				provider_config.setProvider(provider)
				if self.providers[provider]["protocol"] == "sky" or self.providers[provider]["protocol"] == "freesat":
					provider_config.setArea(self.providers_area[provider].value)

				if self.providers_makemain[provider] is None or self.providers_makemain[provider].value == "yes":
					provider_config.setMakeNormalMain()
				elif self.providers_makemain[provider].value == "hd":
					provider_config.setMakeHDMain()
				elif self.providers_makemain[provider].value == "custom":
					provider_config.setMakeCustomMain()
					provider_config.setCustomFilename(self.providers_custommain[provider].value)

				if self.providers_makesections[provider] and self.providers_makesections[provider].value:
					provider_config.setMakeSections()

				if self.providers_makehd[provider] and self.providers_makehd[provider].value and (self.providers_makemain[provider] is None or self.providers_makemain[provider].value != "hd"):
					provider_config.setMakeHD()

				if self.providers_makefta[provider] and self.providers_makefta[provider].value:
					provider_config.setMakeFTA()

				if self.providers_swapchannels[provider] and self.providers_swapchannels[provider].value:
					provider_config.setSwapChannels()

				config_string += provider_config.serialize()

		config.autobouquetsmaker.providers.value = config_string
		config.autobouquetsmaker.providers.save()
		configfile.save()