Esempio n. 1
0
	def keySave(self):
		old_configured_sats = nimmanager.getConfiguredSats()
		self.run()
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed(False)
Esempio n. 2
0
 def keySave(self):
     old_configured_sats = nimmanager.getConfiguredSats()
     self.run()
     new_configured_sats = nimmanager.getConfiguredSats()
     self.unconfed_sats = old_configured_sats - new_configured_sats
     self.satpos_to_remove = None
     self.deleteConfirmed((None, "no"))
Esempio n. 3
0
	def keySave(self):
		old_configured_sats = nimmanager.getConfiguredSats()
		if not self.run():
			return
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 4
0
	def keySave(self):
		old_configured_sats = nimmanager.getConfiguredSats()
		self.run()
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.restoreService(_("Zap back to service before tuner setup?"))
		self.deleteConfirmed((None, "no"))
Esempio n. 5
0
 def keySave(self):
     old_configured_sats = nimmanager.getConfiguredSats()
     self.run()
     new_configured_sats = nimmanager.getConfiguredSats()
     self.unconfed_sats = old_configured_sats - new_configured_sats
     self.satpos_to_remove = None
     self.restoreService(_("Zap back to service before tuner setup?"))
     self.deleteConfirmed((None, "no"))
Esempio n. 6
0
    def onOk(self):
        old_configured_sats = nimmanager.getConfiguredSats()
        self.run()
        new_configured_sats = nimmanager.getConfiguredSats()
        self.unconfed_sats = old_configured_sats - new_configured_sats
        self.satpos_to_remove = None
        #		self.deleteConfirmed((None, "no"))

        return True
Esempio n. 7
0
	def keySave(self):
		if self["config"].isChanged():
			self.stopService()
		old_configured_sats = nimmanager.getConfiguredSats()
		if not self.run():
			return
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 8
0
	def keySave(self):
		if self.isChanged():
			self.stopService()
		old_configured_sats = nimmanager.getConfiguredSats()
		if not self.run():
			return
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 9
0
	def keySave(self):
		if not self.checkLoopthrough():
			self.session.open(MessageBox, _("The loopthrough setting is wrong."),MessageBox.TYPE_ERROR,timeout=10)
			return

		old_configured_sats = nimmanager.getConfiguredSats()
		self.run()
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 10
0
	def keySave(self):
		if not self.checkLoopthrough():
			self.session.open(MessageBox, _("The loopthrough setting is wrong."),MessageBox.TYPE_ERROR,timeout=10)
			return

		old_configured_sats = nimmanager.getConfiguredSats()
		self.run()
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 11
0
	def keySave(self):
		if self["config"].isChanged():
			self.stopService()
		if not self.unicableconnection():
			self.session.open(MessageBox, _("The unicable connection setting is wrong.\n Maybe recursive connection of tuners."),MessageBox.TYPE_ERROR,timeout=10)
			return
		if not self.checkLoopthrough():
			self.session.open(MessageBox, _("The loopthrough setting is wrong."),MessageBox.TYPE_ERROR,timeout=10)
			return
		old_configured_sats = nimmanager.getConfiguredSats()
		if not self.run():
			return
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 12
0
	def keySave(self):
		if self["config"].isChanged():
			self.stopService()
		if not self.unicableconnection():
			self.session.open(MessageBox, _("The unicable connection setting is wrong.\n Maybe recursive connection of tuners."),MessageBox.TYPE_ERROR,timeout=10)
			return
		if not self.checkLoopthrough():
			self.session.open(MessageBox, _("The loopthrough setting is wrong."),MessageBox.TYPE_ERROR,timeout=10)
			return
		old_configured_sats = nimmanager.getConfiguredSats()
		if not self.run():
			return
		new_configured_sats = nimmanager.getConfiguredSats()
		self.unconfed_sats = old_configured_sats - new_configured_sats
		self.satpos_to_remove = None
		self.deleteConfirmed((None, "no"))
Esempio n. 13
0
    def __init__(self, session, protocol):
        if (getDesktop(0).size().width() < 800):
            skin = "%s/skins/providers_sd.xml" % os.path.dirname(
                sys.modules[__name__].__file__)
        else:
            skin = "%s/skins/providers_hd.xml" % os.path.dirname(
                sys.modules[__name__].__file__)
        f = open(skin, "r")
        self.skin = f.read()
        f.close()
        Screen.__init__(self, session)
        if protocol == "xmltv":
            protocol_title = _("XMLTV")
        elif protocol == "opentv":
            protocol_title = _("OpenTV")
            from Components.NimManager import nimmanager
            self.configured_sats = nimmanager.getConfiguredSats()
        elif protocol == "xepgdb":
            protocol_title = _("XEPGDB")
        elif protocol == "script":
            protocol_title = _("Scripts")
        elif protocol == "mhw2":
            protocol_title = _("MHW2")
        self.setup_title = _("CrossEPG") + " - " + protocol_title + ' ' + _(
            "providers")
        Screen.setTitle(self, self.setup_title)

        self.patchtype = getEPGPatchType()
        self.config = CrossEPG_Config()
        self.config.load()
        self.providers = self.config.getAllProviders()
        self.protocol = protocol

        self.has_chnaged = False
        self.old_service = None
        self.onChangedEntry = []
        self.list = []

        self["list"] = List(self.list)
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button(_("Save"))
        self["key_yellow"] = Button(_("Download"))
        self["key_blue"] = Button("")
        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions", "MenuActions"], {
                "red": self.keyCancel,
                "cancel": self.keyCancel,
                "green": self.keySave,
                "ok": self.switchState,
                "yellow": self.download,
                "menu": self.keyCancel,
            }, -2)

        self.buildList()
Esempio n. 14
0
 def prepare(self):
     self.title = _("Choose Servicelist")
     self.text = _(
         "Please choose the default service list you want to install.")
     self._setDirectory()
     Log.w("configuredSats: %s" % (nimmanager.getConfiguredSats()))
     packages = self.fillPackagesList()
     Log.w(str(packages))
     if not packages:
         return False
     return True
Esempio n. 15
0
    def prerequisiteMet(self, prerequisites):

        # TODO: we need to implement a hardware detection here...
        print "prerequisites:", prerequisites
        met = True
        if self.neededTag is None:
            if prerequisites.has_key("tag"):
                return False
        elif self.neededTag == 'ALL_TAGS':
            return True
        else:
            if prerequisites.has_key("tag"):
                if not self.neededTag in prerequisites["tag"]:
                    return False
            else:
                return False

        if self.neededFlag is None:
            if prerequisites.has_key("flag"):
                return False
        else:
            if prerequisites.has_key("flag"):
                if not self.neededFlag in prerequisites["flag"]:
                    return False
            else:
                return True  # No flag found, assuming all flags valid

        if prerequisites.has_key("satellite"):
            for sat in prerequisites["satellite"]:
                if int(sat) not in nimmanager.getConfiguredSats():
                    return False
        if prerequisites.has_key("bcastsystem"):
            has_system = False
            for bcastsystem in prerequisites["bcastsystem"]:
                if nimmanager.hasNimType(bcastsystem):
                    has_system = True
            if not has_system:
                return False
        if prerequisites.has_key("hardware"):
            hardware_found = False
            for hardware in prerequisites["hardware"]:
                if hardware == self.hardware_info.device_name:
                    hardware_found = True
            if not hardware_found:
                return False
        if prerequisites.has_key("eth0mac"):
            nm = eNetworkManager.getInstance()
            for service in nm.getServices():
                ethernet = NetworkInterface(service).ethernet
                if ethernet.interface == "eth0":
                    if ethernet.mac != prerequisites["eth0mac"]:
                        return False
        return True
	def __init__(self, session, protocol):
		if (getDesktop(0).size().width() < 800):
			skin = "%s/skins/providers_sd.xml" % os.path.dirname(sys.modules[__name__].__file__)
		else:
			skin = "%s/skins/providers_hd.xml" % os.path.dirname(sys.modules[__name__].__file__)
		f = open(skin, "r")
		self.skin = f.read()
		f.close()
		Screen.__init__(self, session)
		if protocol == "xmltv":
			protocol_title = _("XMLTV")
		elif protocol == "opentv":
			protocol_title = _("OpenTV")
			from Components.NimManager import nimmanager
			self.configured_sats = nimmanager.getConfiguredSats()
		elif protocol == "xepgdb":
			protocol_title = _("XEPGDB")
		elif protocol == "script":
			protocol_title = _("Scripts")
		elif protocol == "mhw2":
			protocol_title = _("MHW2")
		self.setup_title = _("CrossEPG") + " - " + protocol_title + ' ' + _("providers")
		Screen.setTitle(self, self.setup_title)

		self.patchtype = getEPGPatchType()
		self.config = CrossEPG_Config()
		self.config.load()
		self.providers = self.config.getAllProviders()
		self.protocol = protocol

		self.has_chnaged = False
		self.old_service = None
		self.onChangedEntry = [ ]
		self.list = []

		self["list"] = List(self.list)
		self["list"].onSelectionChanged.append(self.selectionChanged)
		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Save"))
		self["key_yellow"] = Button(_("Download"))
		self["key_blue"] = Button("")
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"],
		{
			"red": self.keyCancel,
			"cancel": self.keyCancel,
			"green": self.keySave,
			"ok": self.switchState,
			"yellow": self.download,
			"menu": self.keyCancel,
		}, -2)

		self.buildList()
Esempio n. 17
0
	def prerequisiteMet(self, prerequisites):

		# TODO: we need to implement a hardware detection here...
		print "prerequisites:", prerequisites
		if self.neededTag is None:
			if prerequisites.has_key("tag"):
				return False
		elif self.neededTag == 'ALL_TAGS':
				return True
		else:
			if prerequisites.has_key("tag"):
				if not self.neededTag in prerequisites["tag"]:
					return False
			else:
				return False

		if self.neededFlag is None:
			if prerequisites.has_key("flag"):
				return False
		else:
			if prerequisites.has_key("flag"):
				if not self.neededFlag in prerequisites["flag"]:
					return False
			else:
				return True # No flag found, assuming all flags valid
				
		if prerequisites.has_key("satellite"):
			for sat in prerequisites["satellite"]:
				if int(sat) not in nimmanager.getConfiguredSats():
					return False			
		if prerequisites.has_key("bcastsystem"):
			has_system = False
			for bcastsystem in prerequisites["bcastsystem"]:
				if nimmanager.hasNimType(bcastsystem):
					has_system = True
			if not has_system:
				return False
		if prerequisites.has_key("hardware"):
			hardware_found = False
			for hardware in prerequisites["hardware"]:
				if hardware == self.hardware_info.device_name:
					hardware_found = True
			if not hardware_found:
				return False
		if prerequisites.has_key("eth0mac"):
			nm = eNetworkManager.getInstance()
			for service in nm.getServices():
				ethernet = NetworkInterface(service).ethernet
				if ethernet.interface == "eth0":
					if ethernet.mac != prerequisites["eth0mac"]:
						return False
		return True
Esempio n. 18
0
    def prerequisiteMet(self, prerequisites):
        # TODO: we need to implement a hardware detection here...
        print "prerequisites:", prerequisites
        met = True
        if self.neededTag is None:
            if prerequisites.has_key("tag"):
                return False
        elif self.neededTag == 'ALL_TAGS':
            return True
        else:
            if prerequisites.has_key("tag"):
                if not self.neededTag in prerequisites["tag"]:
                    return False
            else:
                return False

        if self.neededFlag is None:
            if prerequisites.has_key("flag"):
                return False
        else:
            if prerequisites.has_key("flag"):
                if not self.neededFlag in prerequisites["flag"]:
                    return False
            else:
                return True  # No flag found, assuming all flags valid

        if prerequisites.has_key("satellite"):
            for sat in prerequisites["satellite"]:
                if int(sat) not in nimmanager.getConfiguredSats():
                    return False
        if prerequisites.has_key("bcastsystem"):
            has_system = False
            for bcastsystem in prerequisites["bcastsystem"]:
                if nimmanager.hasNimType(bcastsystem):
                    has_system = True
            if not has_system:
                return False
        if prerequisites.has_key("hardware"):
            hardware_found = False
            for hardware in prerequisites["hardware"]:
                if hardware == self.hardware_info.device_name:
                    hardware_found = True
                elif hardware == self.hardware_info_vu.device_name:
                    hardware_found = True
                elif hardware == self.hardware_info_vu.vendor_name:
                    hardware_found = True
            if not hardware_found:
                return False
        return True
Esempio n. 19
0
	def prerequisiteMet(self, prerequisites):
		# TODO: we need to implement a hardware detection here...
		print "prerequisites:", prerequisites
		met = True
		if self.neededTag is None:
			if prerequisites.has_key("tag"):
				return False
		elif self.neededTag == 'ALL_TAGS':
				return True
		else:
			if prerequisites.has_key("tag"):
				if not self.neededTag in prerequisites["tag"]:
					return False
			else:
				return False

		if self.neededFlag is None:
			if prerequisites.has_key("flag"):
				return False
		else:
			if prerequisites.has_key("flag"):
				if not self.neededFlag in prerequisites["flag"]:
					return False
			else:
				return True # No flag found, assuming all flags valid
				
		if prerequisites.has_key("satellite"):
			for sat in prerequisites["satellite"]:
				if int(sat) not in nimmanager.getConfiguredSats():
					return False			
		if prerequisites.has_key("bcastsystem"):
			has_system = False
			for bcastsystem in prerequisites["bcastsystem"]:
				if nimmanager.hasNimType(bcastsystem):
					has_system = True
			if not has_system:
				return False
		if prerequisites.has_key("hardware"):
			hardware_found = False
			for hardware in prerequisites["hardware"]:
				if hardware == self.hardware_info.device_name:
					hardware_found = True
				elif hardware == self.hardware_info_vu.device_name:
					hardware_found = True
				elif hardware == self.hardware_info_vu.vendor_name:
					hardware_found = True
			if not hardware_found:
				return False
		return True
Esempio n. 20
0
def obterSatelites():
    from Components.NimManager import nimmanager
    nimmanager.readTransponders()
    satConfigureds = nimmanager.getConfiguredSats()
    sats=[]
    for sat in satConfigureds:
        print sat
        nome=nimmanager.getSatName(sat)
                
        sats.append((sat,nome))


    if nimmanager.hasNimType("DVB-C"):
        sats.append(("DVB-C","DVB-C"))
    return sats
    def prerequisiteMet(self, prerequisites):
        met = True
        if self.neededTag is None:
            if "tag" in prerequisites:
                return False
        elif self.neededTag == 'ALL_TAGS':
            return True
        else:
            if "tag" in prerequisites:
                if not self.neededTag in prerequisites["tag"]:
                    return False
            else:
                return False

        if self.neededFlag is None:
            if "flag" in prerequisites:
                return False
        else:
            if "flag" in prerequisites:
                if not self.neededFlag in prerequisites["flag"]:
                    return False
            else:
                return True

        if "satellite" in prerequisites:
            for sat in prerequisites["satellite"]:
                if int(sat) not in nimmanager.getConfiguredSats():
                    return False
        if "bcastsystem" in prerequisites:
            has_system = False
            for bcastsystem in prerequisites["bcastsystem"]:
                if nimmanager.hasNimType(bcastsystem):
                    has_system = True
            if not has_system:
                return False
        if "hardware" in prerequisites:
            hardware_found = False
            for hardware in prerequisites["hardware"]:
                if hardware == getBoxType():
                    hardware_found = True
            if not hardware_found:
                return False
        return True
Esempio n. 22
0
	def prerequisiteMet(self, prerequisites):
		met = True
		if self.neededTag is None:
			if "tag" in prerequisites:
				return False
		elif self.neededTag == 'ALL_TAGS':
				return True
		else:
			if "tag" in prerequisites:
				if not self.neededTag in prerequisites["tag"]:
					return False
			else:
				return False

		if self.neededFlag is None:
			if "flag" in prerequisites:
				return False
		else:
			if "flag" in prerequisites:
				if not self.neededFlag in prerequisites["flag"]:
					return False
			else:
				return True

		if "satellite" in prerequisites:
			for sat in prerequisites["satellite"]:
				if int(sat) not in nimmanager.getConfiguredSats():
					return False
		if "bcastsystem" in prerequisites:
			has_system = False
			for bcastsystem in prerequisites["bcastsystem"]:
				if nimmanager.hasNimType(bcastsystem):
					has_system = True
			if not has_system:
				return False
		if "hardware" in prerequisites:
			hardware_found = False
			for hardware in prerequisites["hardware"]:
				if hardware == getBoxType():
					hardware_found = True
			if not hardware_found:
				return False
		return True
Esempio n. 23
0
    def prerequisiteMet(self, prerequisites):
        met = True
        if self.neededTag is None:
            if prerequisites.has_key("tag"):
                return False
        elif self.neededTag == 'ALL_TAGS':
            return True
        else:
            if prerequisites.has_key("tag"):
                if not self.neededTag in prerequisites["tag"]:
                    return False
            else:
                return False

        if self.neededFlag is None:
            if prerequisites.has_key("flag"):
                return False
        else:
            if prerequisites.has_key("flag"):
                if not self.neededFlag in prerequisites["flag"]:
                    return False
            else:
                return True

        if prerequisites.has_key("satellite"):
            for sat in prerequisites["satellite"]:
                if int(sat) not in nimmanager.getConfiguredSats():
                    return False
        if prerequisites.has_key("bcastsystem"):
            has_system = False
            for bcastsystem in prerequisites["bcastsystem"]:
                if nimmanager.hasNimType(bcastsystem):
                    has_system = True
            if not has_system:
                return False
        if prerequisites.has_key("hardware"):
            hardware_found = False
            for hardware in prerequisites["hardware"]:
                if hardware == HardwareInfo().device_name:
                    hardware_found = True
            if not hardware_found:
                return False
        return True
Esempio n. 24
0
	def prerequisiteMet(self, prerequisites):
		met = True
		if self.neededTag is None:
			if prerequisites.has_key("tag"):
				return False
		elif self.neededTag == 'ALL_TAGS':
				return True
		else:
			if prerequisites.has_key("tag"):
				if not self.neededTag in prerequisites["tag"]:
					return False
			else:
				return False

		if self.neededFlag is None:
			if prerequisites.has_key("flag"):
				return False
		else:
			if prerequisites.has_key("flag"):
				if not self.neededFlag in prerequisites["flag"]:
					return False
			else:
				return True

		if prerequisites.has_key("satellite"):
			for sat in prerequisites["satellite"]:
				if int(sat) not in nimmanager.getConfiguredSats():
					return False
		if prerequisites.has_key("bcastsystem"):
			has_system = False
			for bcastsystem in prerequisites["bcastsystem"]:
				if nimmanager.hasNimType(bcastsystem):
					has_system = True
			if not has_system:
				return False
		if prerequisites.has_key("hardware"):
			hardware_found = False
			for hardware in prerequisites["hardware"]:
				if hardware == HardwareInfo().device_name:
					hardware_found = True
			if not hardware_found:
				return False
		return True
Esempio n. 25
0
    def prerequisiteMet(self, prerequisites):
        met = True
        if self.neededTag is None:
            if prerequisites.has_key('tag'):
                return False
        else:
            if self.neededTag == 'ALL_TAGS':
                return True
            if prerequisites.has_key('tag'):
                if self.neededTag not in prerequisites['tag']:
                    return False
            else:
                return False
        if self.neededFlag is None:
            if prerequisites.has_key('flag'):
                return False
        elif prerequisites.has_key('flag'):
            if self.neededFlag not in prerequisites['flag']:
                return False
        else:
            return True
        if prerequisites.has_key('satellite'):
            for sat in prerequisites['satellite']:
                if int(sat) not in nimmanager.getConfiguredSats():
                    return False

        if prerequisites.has_key('bcastsystem'):
            has_system = False
            for bcastsystem in prerequisites['bcastsystem']:
                if nimmanager.hasNimType(bcastsystem):
                    has_system = True

            if not has_system:
                return False
        if prerequisites.has_key('hardware'):
            hardware_found = False
            for hardware in prerequisites['hardware']:
                if hardware == getBoxType():
                    hardware_found = True

            if not hardware_found:
                return False
        return True
Esempio n. 26
0
    def prerequisiteMet(self, prerequisites):
        met = True
        if self.neededTag is None:
            if prerequisites.has_key('tag'):
                return False
        else:
            if self.neededTag == 'ALL_TAGS':
                return True
            if prerequisites.has_key('tag'):
                if self.neededTag not in prerequisites['tag']:
                    return False
            else:
                return False
        if self.neededFlag is None:
            if prerequisites.has_key('flag'):
                return False
        elif prerequisites.has_key('flag'):
            if self.neededFlag not in prerequisites['flag']:
                return False
        else:
            return True
        if prerequisites.has_key('satellite'):
            for sat in prerequisites['satellite']:
                if int(sat) not in nimmanager.getConfiguredSats():
                    return False

        if prerequisites.has_key('bcastsystem'):
            has_system = False
            for bcastsystem in prerequisites['bcastsystem']:
                if nimmanager.hasNimType(bcastsystem):
                    has_system = True

            if not has_system:
                return False
        if prerequisites.has_key('hardware'):
            hardware_found = False
            for hardware in prerequisites['hardware']:
                if hardware == getBoxType():
                    hardware_found = True

            if not hardware_found:
                return False
        return True
Esempio n. 27
0
def orbposChoicelist():
    choiceList = [(orbposDisabled, _('disabled'), 0)]
    nsDVBT = 0xeeee << 16
    nsDVBC = 0xffff << 16
    namespaces = set()
    if nimmanager.hasNimType("DVB-T") and nimmanager.terrestrialsList:
        namespaces.add(nsDVBT)
    if nimmanager.hasNimType("DVB-C") and nimmanager.cablesList:
        namespaces.add(nsDVBC)
    hasNamespaces = getNamespaces(namespaces)
    if nsDVBT in hasNamespaces:
        choiceList.append((nsDVBT >> 16, _('DVB-T Terrestrial services'), 0))
    if nsDVBC in hasNamespaces:
        choiceList.append((nsDVBC >> 16, _('DVB-C Cable services'), 0))
    choiceList += [
        (orbpos, nimmanager.getSatDescription(orbpos), 0)
        for orbpos in sorted(nimmanager.getConfiguredSats(),
                             key=lambda x: x if x <= 1800 else x - 3600)
    ]
    return choiceList
Esempio n. 28
0
	def __init__(self, session, silent = True, showSteps = False):
		self.xmlfile = "defaultsatlists.xml"
		DefaultWizard.__init__(self, session, silent, showSteps, neededTag = "services")
		print "configuredSats:", nimmanager.getConfiguredSats()
Esempio n. 29
0
	def __init__(self, session, silent = True, showSteps = False):
		self.xmlfile = "defaultsatlists.xml"
		DefaultWizard.__init__(self, session, silent, showSteps, neededTag = "services")
		print "configuredSats:", nimmanager.getConfiguredSats()