Ejemplo n.º 1
0
	def config(self, reset=False):
		debug("> ListingData.config() reset=%s" % reset)

		title = "%s - %s" % (self.name, __language__(976))
		configSMB = ConfigSMB(title, fnTitle=__language__(977), fnDefaultValue=XMLTV_FILE)
		if reset:
			configSMB.ask()

		smbDetails = configSMB.checkAll(silent=True)
		if smbDetails:
			self.smbIP, self.smbPath, self.smbRemoteFile = smbDetails
			self.isConfigured = True
		else:
			self.isConfigured = False
		self.connectionError = False	# will allow a retry after a config change

		debug("< ListingData.config() isConfigured=%s" % self.isConfigured)
		return self.isConfigured
Ejemplo n.º 2
0
def configSMB(reset=True):
    debug("> configSMB() reset=%s" % reset)
    success = False
    from smbLib import ConfigSMB

    cSMB = ConfigSMB(__language__(976))
    while not success:
        if not reset:
            smbDetails = cSMB.checkAll(silent=True)
            if smbDetails:
                success = True
            elif not xbmcgui.Dialog().yesno(__language__(959), __language__(309)):
                break

        if not success or reset:
            cSMB.ask()
            reset = False	# allows changes to be checked

    debug("< myTV.configSMB() success= %s" % success)
    return success