def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because it does not exist." del self.modes["DVI-PC"] self.createConfig() self.readPreferredModes() # re-define AVSwitch components from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.changedAspect) config.av.wss.addNotifier(self.changedAspect) config.av.policy_169.addNotifier(self.changedAspect) config.av.policy_43.addNotifier(self.changedAspect) # addNotifiers for port, mode, rate config.av.videoport.addNotifier(self.changedVideomode) for port in self.getPortList(): config.av.videomode[port].addNotifier(self.changedVideomode) for mode in self.getModeList(port): config.av.videorate[mode[0]].addNotifier(self.changedVideomode) self.is_init = False
def __init__(self): self.on_hotplug = CList() self.createConfig() # self.on_hotplug.append(self.createConfig) # config.av.colorformat.notifiers = [ ] config.av.aspectratio.notifiers = [ ] config.av.tvsystem.notifiers = [ ] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect) config.pc.image4_3_zoom_x.addNotifier(self.updateAspect) config.pc.image4_3_zoom_y.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.pc.image16_9_zoom_x.addNotifier(self.updateAspect) config.pc.image16_9_zoom_y.addNotifier(self.updateAspect) config.av.deinterlace = ConfigSelection(choices = {"0": _("Off"), "1": _("On")}, default="0") config.av.deinterlace_sd = ConfigSelection(choices = self.deinterlace_modes, default="4") config.av.deinterlace_hd = ConfigSelection(choices = self.deinterlace_modes, default="3") config.av.deinterlace.addNotifier(self.updateDeinterlace) config.av.deinterlace_sd.addNotifier(self.updateDeinterlace) config.av.deinterlace_hd.addNotifier(self.updateDeinterlace) config.pc.sd_sharpness = ConfigSelection(choices = {"0": _("Off"), "1": _("On")}, default="0") config.pc.sd_noise = ConfigSelection(choices = {"0": _("Off"), "1": _("On")}, default="0") config.pc.sd_sharpness.addNotifier(self.updateSDfeatures) config.pc.sd_noise.addNotifier(self.updateSDfeatures)
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if boxtype in ('et4x00', 'xp1000', 'tm2t', 'tmsingle', 'vusolo2', 'tmnano', 'iqonios300hd', 'odinm7', 'e3hd', 'dm500hdv2', 'dm500hd', 'dm800', 'ebox7358', 'eboxlumi', 'ebox5100', 'ixusszero', 'optimussos1') or (about.getModelString() == 'ini-3000'): del self.modes["YPbPr"] if hw_type in ('elite', 'premium', 'premium+', 'ultra', "me", "minime"): self.readPreferredModes() self.createConfig() self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if getBoxType() == 'et4x00' or getBoxType() == 'xp1000' or getBoxType( ) == 'tm2t' or getBoxType() == 'tmsingle' or getBoxType() == 'odimm7': del self.modes["YPbPr"] if getBoxType() == 'gbquad' or getBoxType() == 'et5x00' or getBoxType( ) == 'ixussone': del self.modes["Scart"] self.createConfig() self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.downstream_elements = CList() self.master = None self.sources = [ ] self.source = None self.__suspended = True self.cache = None
def __init__(self): self["Title"] = StaticText() self.onLayoutFinish = [ ] self.summaries = CList() self.instance = None self.desktop = None self.screenPathMode = False
def __init__(self): self.last_modes_preferred = [ ] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() self.is24hzAvailable() self.widescreen_modes = set(["720p", "1080i", "1080p", "2160p", "2160p30"]).intersection(*[self.modes_available]) if "DVI-PC" in self.modes and not self.getModeList("DVI-PC"): print "[VideoHardware] remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if "Scart" in self.modes and not self.getModeList("Scart"): print "[VideoHardware] remove Scart because of not existing modes" del self.modes["Scart"] self.createConfig() self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [ ] config.av.tvsystem.notifiers = [ ] config.av.wss.notifiers = [ ] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self, session, parent=None, mandatoryWidgets=None): dict.__init__(self) self.skinName = self.__class__.__name__ self.session = session self.parent = parent self.mandatoryWidgets = mandatoryWidgets self.onClose = [] self.onFirstExecBegin = [] self.onExecBegin = [] self.onExecEnd = [] self.onLayoutFinish = [] self.onShown = [] self.onShow = [] self.onHide = [] self.execing = False self.shown = True # DEBUG: Variable already_shown used in CutListEditor/ui.py and StartKodi/plugin.py... # DEBUG: self.alreadyShown = False # Already shown is false until the screen is really shown (after creation). self.already_shown = False # Already shown is false until the screen is really shown (after creation). self.renderer = [] self.helpList = [] # In order to support screens *without* a help, we need the list in every screen. how ironic. self.close_on_next_exec = None # DEBUG: Variable already_shown used in webinterface/src/WebScreens.py... # DEBUG: self.standAlone = False # Stand alone screens (for example web screens) don't care about having or not having focus. self.stand_alone = False # Stand alone screens (for example web screens) don't care about having or not having focus. self.keyboardMode = None self.desktop = None self.instance = None self.summaries = CList() self["Title"] = StaticText() self["ScreenPath"] = StaticText() self.screenPath = "" # This is the current screen path without the title. self.screenTitle = "" # This is the current screen title without the path.
def __init__(self): self.hdd = [] self.cd = "" self.partitions = [] self.devices_scanned_on_init = [] self.on_partition_list_change = CList() self.enumerateBlockDevices() # Find stuff not detected by the enumeration p = (("/media/hdd", _("Hard disk")), ("/media/card", _("Card")), ("/media/cf", _("Compact flash")), ("/media/mmc", _("MMC card")), ("/media/net", _("Network mount")), ("/media/net1", _("Network mount %s") % ("1")), ("/media/net2", _("Network mount %s") % ("2")), ("/media/net3", _("Network mount %s") % ("3")), ("/media/ram", _("Ram disk")), ("/media/usb", _("USB stick")), ("/", _("Internal flash"))) known = set([ os.path.normpath(a.mountpoint) for a in self.partitions if a.mountpoint ]) for m, d in p: if (m not in known) and os.path.ismount(m): self.partitions.append(Partition(mountpoint=m, description=d))
def __init__(self): self.hdd = [] self.cd = "" self.partitions = [] self.devices_scanned_on_init = [] self.on_partition_list_change = CList() self.enumerateBlockDevices() # currently, this is just an enumeration of what's possible, # this probably has to be changed to support automount stuff. # still, if stuff is mounted into the correct mountpoints by # external tools, everything is fine (until somebody inserts # a second usb stick.) p = [("/media/hdd", _("Harddisk")), ("/media/hdd1", _("Harddisk") + _(" 1")), ("/media/hdd2", _("Harddisk") + _(" 2")), ("/media/hdd3", _("Harddisk") + _(" 3")), ("/media/card", _("Card")), ("/media/cf", _("Compact Flash")), ("/media/mmc1", _("MMC Card")), ("/media/net", _("Network Mount")), ("/media/net/autofs", _("Network Mount") + " (autofs)"), ("/media/ram", _("Ram Disk")), ("/media/usb", _("USB Stick")), ("/media/usb1", _("USB Stick") + _(" 1")), ("/media/usb2", _("USB Stick") + _(" 2")), ("/media/usb3", _("USB Stick") + _(" 3")), ("/media/upnp", _("UPNP")), ("/", _("Internal Flash"))] self.partitions.extend( [Partition(mountpoint=x[0], description=x[1]) for x in p])
def __init__(self): config.av.edid_override = ConfigYesNo(default = False) self.__initInternalValues() self.last_modes_preferred = [ ] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] self.createConfig() # self.on_hotplug.append(self.createConfig) self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch # config.av.colorformat.notifiers = [ ] config.av.aspectratio.clearNotifiers() config.av.tvsystem.clearNotifiers() config.av.wss.clearNotifiers() AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) if SystemInfo["AnalogOutput"]: config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect) self.setConfiguredMode()
def __init__(self): self["Title"] = StaticText() self["DeveloperTag"] = StaticText() self.onLayoutFinish = [] self.summaries = CList() self.instance = None self.desktop = None
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] self.createConfig() # self.on_hotplug.append(self.createConfig) self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch # config.av.colorformat.notifiers = [ ] config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.hdd = [] self.partitions = [] self.cd = "" self.on_partition_list_change = CList() self.enumerateBlockDevices() self.enumerateNetworkMounts()
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() self.createConfig() self.readPreferredModes()
def __init__(self): self['Title'] = StaticText() self.onLayoutFinish = [] self.onAnimationEnd = [] self.summaries = CList() self.instance = None self.desktop = None return
def __init__(self, windowTitle=None): self["Title"] = StaticText() self.onLayoutFinish = [] self.summaries = CList() self.instance = None self.desktop = None self._zPosition = None if windowTitle: self.setTitle(windowTitle)
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() self.widescreen_modes = set( ["720p", "1080i", "1080p", "2160p", "2160p30"]).intersection(*[self.modes_available]) if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "[VideoHardware] remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if self.modes.has_key("Scart") and not self.getModeList("Scart"): print "[VideoHardware] remove Scart because of not existing modes" del self.modes["Scart"] self.createConfig() self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect #+++> config.av.colorformat_hdmi = ConfigSelection(choices={ "hdmi_rgb": _("RGB"), "hdmi_yuv": _("YUV"), "hdmi_422": _("422") }, default="hdmi_rgb") config.av.colorformat_yuv = ConfigSelection(choices={"yuv": _("YUV")}, default="yuv") config.av.hdmi_audio_source = ConfigSelection(choices={ "pcm": _("PCM"), "spdif": _("SPDIF") }, default="pcm") config.av.threedmode = ConfigSelection(choices={ "off": _("Off"), "sbs": _("Side by Side"), "tab": _("Top and Bottom") }, default="off") config.av.threedmode.addNotifier(self.set3DMode) config.av.colorformat_hdmi.addNotifier(self.setHDMIColor) config.av.colorformat_yuv.addNotifier(self.setYUVColor) config.av.hdmi_audio_source.addNotifier(self.setHDMIAudioSource) #+++< config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.hdd = [] self.cd = '' self.partitions = [] self.devices_scanned_on_init = [] self.on_partition_list_change = CList() self.enumerateBlockDevices() self.enumerateNetworkMounts() p = [('/', _('Internal flash'))] self.partitions.extend([ Partition(mountpoint=x[0], description=x[1]) for x in p ])
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if getBoxType() == 'et4x00' or getBoxType() == 'xp1000' or getBoxType( ) == 'iqonios300hd' or getBoxType() == 'tm2t' or getBoxType( ) == 'tmsingle' or getBoxType() == 'tmnano' or getBoxType( ) == 'odimm7' or model == 'ini-3000' or getBoxType( ) == 'vusolo2' or getBoxType() == 'e3hd' or getBoxType( ) == 'dm500hd' or getBoxType() == 'dm800' or getBoxType( ) == 'ebox7358' or getBoxType() == 'ebox5100' or getBoxType( ) == 'ixusszero': del self.modes["YPbPr"] if getBoxType() == 'gbquad' or getBoxType( ) == 'et5x00' or model == 'et6000' or getBoxType( ) == 'e3hd' or getBoxType() == 'odinm6' or getBoxType( ) == 'ebox7358' or getBoxType( ) == 'tmnano' or self.hw_type == 'ultra' or self.hw_type == "me" or self.hw_type == "minime": del self.modes["Scart"] if self.hw_type == 'elite' or self.hw_type == 'premium' or self.hw_type == 'premium+' or self.hw_type == 'ultra' or self.hw_type == "me" or self.hw_type == "minime": self.readPreferredModes() self.createConfig() self.readPreferredModes() portlist = self.getPortList() has1080p50 = False for port in portlist: if port == 'DVI' and HardwareInfo().has_hdmi(): if "1080p50" in self.modes_available: has1080p50 = True if has1080p50: self.widescreen_modes = set(["720p", "1080i", "1080p"]) else: self.widescreen_modes = set(["720p", "1080i"]) # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.hdd = [ ] self.cd = "" self.partitions = [ ] self.devices_scanned_on_init = [ ] self.on_partition_list_change = CList() self.enumerateBlockDevices() self.enumerateNetworkMounts() # Find stuff not detected by the enumeration p = [("/", _("Internal flash"))] self.partitions.extend([ Partition(mountpoint = x[0], description = x[1]) for x in p ])
def __init__(self): self.hdd = [] self.cd = "" # Partitions should always have a trailing / self.partitions = [] self.volume_labels = VolumeLabels() self.devices_scanned_on_init = [] self.on_partition_list_change = CList() self.enumerateBlockDevices() # Find stuff not detected by the enumeration self.enumerateNetworkMounts() # Find stuff not detected by the enumeration p = [("/", _("Internal Flash")), ("/media/upnp/", _("DLNA")), ] self.partitions.extend([Partition(mountpoint=x[0], description=x[1], shortdescription=x[1]) for x in p])
def __init__(self, name): self.tasks = [] self.resident_tasks = [] self.workspace = "/tmp" self.current_task = 0 self.callback = None self.name = name self.finished = False self.end = 100 self.__progress = 0 self.weightScale = 1 self.afterEvent = None self.state_changed = CList() self.status = self.NOT_STARTED self.onSuccess = None
def __init__(self): self.hdd = [] self.cd = "" self.partitions = [] self.devices_scanned_on_init = [] self.on_partition_list_change = CList() self.enumerateBlockDevices() # Find stuff not detected by the enumeration p = [("/", _("Internal Flash"))] try: netmount = listdir('/media/net') for fil in netmount: p.append(('/media/net/' + fil, fil)) except: pass self.partitions.extend( [Partition(mountpoint=x[0], description=x[1]) for x in p])
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if getBoxType() == 'et4x00' or getBoxType() == 'xp1000' or getBoxType( ) == 'iqonios300hd' or getBoxType() == 'tm2t' or getBoxType( ) == 'tmsingle' or getBoxType() == 'tmnano' or getBoxType( ) == 'odimm7' or model == 'ini-3000' or getBoxType( ) == 'vusolo2' or getBoxType() == 'e3hd' or getBoxType( ) == 'dm500hd' or getBoxType() == 'dm800' or getBoxType( ) == 'ebox7358' or getBoxType() == 'ebox5100' or getBoxType( ) == 'ixusszero' or getBoxType() == 'optimussos1': del self.modes["YPbPr"] if getBoxType() == 'gbquad' or getBoxType( ) == 'et5x00' or model == 'et6000' or getBoxType( ) == 'e3hd' or getBoxType() == 'odinm6' or getBoxType( ) == 'ebox7358' or getBoxType( ) == 'tmnano' or self.hw_type == 'ultra' or self.hw_type == "me" or self.hw_type == "minime" or getBoxType( ) == 'optimussos1' or getBoxType() == 'optimussos2': del self.modes["Scart"] if self.hw_type == 'elite' or self.hw_type == 'premium' or self.hw_type == 'premium+' or self.hw_type == 'ultra' or self.hw_type == "me" or self.hw_type == "minime": self.readPreferredModes() self.createConfig() self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] if getBoxType() == 'e3hd' or getBoxType() == 'odinm7': del self.modes["YPbPr"] if getBoxType() == 'e3hd': del self.modes["Scart"] self.createConfig() self.readPreferredModes() portlist = self.getPortList() has1080p50 = False for port in portlist: if port == 'DVI' and HardwareInfo().has_hdmi(): if "1080p50" in self.modes_available: has1080p50 = True if has1080p50: self.widescreen_modes = set(["720p", "1080i", "1080p"]) else: self.widescreen_modes = set(["720p", "1080i"]) # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() self.readPreferredModes() if "DVI-PC" in self.modes and not self.getModeList("DVI-PC"): print( "[Videomode] VideoHardware remove DVI-PC because of not existing modes" ) del self.modes["DVI-PC"] if "Scart" in self.modes and not self.getModeList("Scart"): print( "[Videomode] VideoHardware remove Scart because of not existing modes" ) del self.modes["Scart"] if "YPbPr" in self.modes and not has_yuv: del self.modes["YPbPr"] if "Scart" in self.modes and not has_scart and (has_rca or has_avjack): modes["RCA"] = modes["Scart"] del self.modes["Scart"] if "Scart" in self.modes and not has_rca and not has_scart and not has_avjack: del self.modes["Scart"] self.createConfig() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.hdd = [] self.cd = '' self.partitions = [] self.devices_scanned_on_init = [] self.on_partition_list_change = CList() self.enumerateBlockDevices() p = (('/media/hdd', _('Hard disk')), ('/media/card', _('Card')), ('/media/cf', _('Compact flash')), ('/media/mmc1', _('MMC card')), ('/media/net', _('Network mount')), ('/media/net1', _('Network mount %s') % '1'), ('/media/net2', _('Network mount %s') % '2'), ('/media/net3', _('Network mount %s') % '3'), ('/media/ram', _('Ram disk')), ('/media/usb', _('USB stick')), ('/', _('Internal flash'))) known = set([ os.path.normpath(a.mountpoint) for a in self.partitions if a.mountpoint ]) for m, d in p: if m not in known and os.path.ismount(m): self.partitions.append(Partition(mountpoint=m, description=d))
def __init__(self): self.last_modes_preferred = [ ] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() if self.modes.has_key("DVI-PC") and not self.getModeList("DVI-PC"): print "remove DVI-PC because of not existing modes" del self.modes["DVI-PC"] self.createConfig() # self.on_hotplug.append(self.createConfig) self.readPreferredModes() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch # config.av.colorformat.notifiers = [ ] config.av.aspectratio.notifiers = [ ] config.av.tvsystem.notifiers = [ ] config.av.wss.notifiers = [ ] AVSwitch.getOutputAspect = self.getOutputAspect #+++> config.av.colorformat_hdmi = ConfigSelection(choices = {"hdmi_rgb": _("RGB"), "hdmi_yuv": _("YUV"), "hdmi_422": _("422")}, default="hdmi_rgb") config.av.colorformat_yuv = ConfigSelection(choices = {"yuv": _("YUV")}, default="yuv") # config.av.hdmi_audio_source = ConfigSelection(choices = {"pcm": _("PCM"), "spdif": _("SPDIF"), "8ch": _("8Ch"), "none": _("None")}, default="pcm") config.av.hdmi_audio_source = ConfigSelection(choices = {"pcm": _("PCM"), "spdif": _("SPDIF")}, default="pcm") #+++< config.av.colorformat_hdmi.addNotifier(self.setHDMIColor) config.av.colorformat_yuv.addNotifier(self.setYUVColor) config.av.hdmi_audio_source.addNotifier(self.setHDMIAudioSource) config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)
def __init__(self): self.last_modes_preferred = [] self.on_hotplug = CList() self.current_mode = None self.current_port = None self.readAvailableModes() self.readPreferredModes() if "HDMI-PC" in self.modes and not self.getModeList("HDMI-PC"): print( "[Videomode] VideoHardware remove HDMI-PC because of not existing modes" ) del self.modes["HDMI-PC"] if "Scart" in self.modes and not self.getModeList("Scart"): print( "[Videomode] VideoHardware remove Scart because of not existing modes" ) del self.modes["Scart"] if "YPbPr" in self.modes and not has_yuv: del self.modes["YPbPr"] if "Scart" in self.modes and not has_scart and (has_rca or has_avjack): modes["RCA"] = modes["Scart"] del self.modes["Scart"] if "Scart" in self.modes and not has_rca and not has_scart and not has_avjack: del self.modes["Scart"] self.createConfig() # take over old AVSwitch component :) from Components.AVSwitch import AVSwitch config.av.aspectratio.notifiers = [] config.av.tvsystem.notifiers = [] config.av.wss.notifiers = [] AVSwitch.getOutputAspect = self.getOutputAspect config.av.colorformat_hdmi = ConfigSelection(choices={ "hdmi_rgb": _("RGB"), "hdmi_yuv": _("YUV"), "hdmi_422": _("422") }, default="hdmi_rgb") config.av.colorformat_yuv = ConfigSelection(choices={"yuv": _("YUV")}, default="yuv") config.av.hdmi_audio_source = ConfigSelection(choices={ "pcm": _("PCM"), "spdif": _("SPDIF") }, default="pcm") config.av.threedmode = ConfigSelection(choices={ "off": _("Off"), "sbs": _("Side by Side"), "tab": _("Top and Bottom") }, default="off") config.av.threedmode.addNotifier(self.set3DMode) config.av.colorformat_hdmi.addNotifier(self.setHDMIColor) config.av.colorformat_yuv.addNotifier(self.setYUVColor) config.av.hdmi_audio_source.addNotifier(self.setHDMIAudioSource) config.av.aspect.addNotifier(self.updateAspect) config.av.wss.addNotifier(self.updateAspect) config.av.policy_169.addNotifier(self.updateAspect) config.av.policy_43.addNotifier(self.updateAspect)