def initializeConfigValues(self, configVA, fromOutside):
		print "[AutomaticVolumeAdjustment] initialize config values..."
		self.serviceList = { }
		self.modus = configVA.config.modus.value # get modus
		if self.modus == "0": # Automatic volume adjust mode
			for c in configVA.config.Entries:
					self.serviceList[c.servicereference.value] = int(c.adjustvalue.value) # adjust volume
		else: # Remember channel volume mode
			self.serviceList = getVolumeDict()
		self.defaultValue = int(configVA.config.adustvalue.value)
		self.enabled = configVA.config.enable.value
		self.maxMPEGVolume = configVA.config.mpeg_max_volume.value
		self.showVolumeBar = configVA.config.show_volumebar.value
		if self.modus == "0": # Automatic volume adjust mode
			VolumeControlInit(self.enabled, self.maxMPEGVolume) # overwrite VolumeControl Class, when max MPEG Volume was set (<> 100)
		if not self.pluginStarted and self.enabled and fromOutside:
			self.newService = True
			self.__evUpdatedInfo()
Ejemplo n.º 2
0
	def initializeConfigValues(self, configVA, fromOutside):
		print "[AutomaticVolumeAdjustment] initialize config values..."
		self.serviceList = {}
		self.modus = configVA.config.modus.value # get modus
		if self.modus == "0": # Automatic volume adjust mode
			for c in configVA.config.Entries:
					self.serviceList[c.servicereference.value] = int(c.adjustvalue.value) # adjust volume
		else: # Remember channel volume mode
			self.serviceList = getVolumeDict()
		self.defaultValue = int(configVA.config.adustvalue.value)
		self.enabled = configVA.config.enable.value
		self.maxMPEGVolume = configVA.config.mpeg_max_volume.value
		self.showVolumeBar = configVA.config.show_volumebar.value
		if self.modus == "0": # Automatic volume adjust mode
			VolumeControlInit(self.enabled, self.maxMPEGVolume) # overwrite VolumeControl Class, when max MPEG Volume was set (<> 100)
		if not self.pluginStarted and self.enabled and fromOutside:
			self.newService = True
			self.__evUpdatedInfo()