예제 #1
0
 def saveXML(self):
     try:
         fp = file(self.filename, 'w')
         fp.write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n")
         fp.write("<ci>\n")
         fp.write("\t<slot>\n")
         fp.write("\t\t<id>%s</id>\n" % self.ci_slot)
         for item in self.selectedcaid:
             if len(self.selectedcaid):
                 fp.write("\t\t<caid id=\"%s\" />\n" % item[0])
         for item in self.servicelist:
             if len(self.servicelist):
                 name = item[0].replace('<', '&lt;')
                 name = name.replace('&', '&amp;')
                 name = name.replace('>', '&gt;')
                 name = name.replace('"', '&quot;')
                 name = name.replace("'", '&apos;')
                 if item[2] == 1:
                     fp.write(
                         "\t\t<provider name=\"%s\" dvbnamespace=\"%s\" />\n"
                         % (stringToXML(name), item[3]))
                 else:
                     fp.write("\t\t<service name=\"%s\" ref=\"%s\" />\n" %
                              (stringToXML(name), item[3]))
         fp.write("\t</slot>\n")
         fp.write("</ci>\n")
         fp.close()
     except:
         print "[CI_Config_CI%d] xml not written" % self.ci_slot
         os.unlink(self.filename)
     cihelper.load_ci_assignment(force=True)
예제 #2
0
파일: plugin.py 프로젝트: Atsilla/enigma2-1
	def saveXML(self):
		try:
			fp = file(self.filename, 'w')
			fp.write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n")
			fp.write("<ci>\n")
			fp.write("\t<slot>\n")
			fp.write("\t\t<id>%s</id>\n" % self.ci_slot)
			for item in self.selectedcaid:
				if len(self.selectedcaid):
					fp.write("\t\t<caid id=\"%s\" />\n" % item[0])
			for item in self.servicelist:
				if len(self.servicelist):
					name = item[0].replace('<', '&lt;')
					name = name.replace('&', '&amp;')
					name = name.replace('>', '&gt;')
					name = name.replace('"', '&quot;')
					name = name.replace("'", '&apos;')
					if item[2]==1:
						fp.write("\t\t<provider name=\"%s\" dvbnamespace=\"%s\" />\n" % (name, item[3]))
					else:
						fp.write("\t\t<service name=\"%s\" ref=\"%s\" />\n"  % (name, item[3]))
			fp.write("\t</slot>\n")
			fp.write("</ci>\n")
			fp.close()
		except:
			print "[CI_Config_CI%d] xml not written" %self.ci_slot
			os.unlink(self.filename)
		cihelper.load_ci_assignment(force = True)
예제 #3
0
파일: plugin.py 프로젝트: Atsilla/enigma2-1
def activate_all(session):
	cihelper.load_ci_assignment()
예제 #4
0
def activate_all(session, editcallback=False):
    cihelper.load_ci_assignment()
예제 #5
0
def activate_all(session):
    cihelper.load_ci_assignment()
예제 #6
0
 def cancel(self):
     self.saveXML()
     cihelper.load_ci_assignment(force=True)
     self.close()
예제 #7
0
파일: plugin.py 프로젝트: Adga52/enigma2
def activate_all(session, editcallback=False):
	cihelper.load_ci_assignment()
예제 #8
0
파일: plugin.py 프로젝트: Openeight/enigma2
	def cancel(self):
		self.saveXML()
		cihelper.load_ci_assignment(force=True)
		self.close()