rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
cmd = "fsck.ext3 -f -p " + self.partitionPath("1") | cmd = "fsck.ext3 -f -p " + self.disk_path | def fsck(self): # We autocorrect any failures # TODO: we could check if the fs is actually ext3 cmd = "fsck.ext3 -f -p " + self.partitionPath("1") res = system(cmd) return (res >> 8) |
job = Task.Job(_("Check storage device...")) task = Task.PythonTask(job, _("Unmount")) task.work = self.unmount | job = Task.Job(_("Checking Filesystem...")) if self.findMount(): task = Task.PythonTask(job, _("Unmount")) task.work = self.unmount dev = self.mount_device else: dev = self.partitionPath("1") | def createCheckJob(self): job = Task.Job(_("Check storage device...")) |
task.args.append(self.partitionPath("1")) | task.args.append(dev) | def createCheckJob(self): job = Task.Job(_("Check storage device...")) |
tmp = [x for x in self.lastroot.value.split(';') if x != ''] | tmp = [x for x in config.radio.lastroot.value.split(';') if x != ''] | def restoreRoot(self): tmp = [x for x in self.lastroot.value.split(';') if x != ''] current = [x.toString() for x in self.servicePath] if tmp != current or self.rootChanged: cnt = 0 for i in tmp: self.servicePathRadio.append(eServiceReference(i)) cnt += 1 if cnt: path = self.servicePathRadio.pop() self.enterPath(path) ... |
"":"None", | "None":"None", | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
config.autolanguage.subtitle_autoselect1 = ConfigSelection(choices=subtitle_language_choices,default="") config.autolanguage.subtitle_autoselect2 = ConfigSelection(choices=subtitle_language_choices,default="") config.autolanguage.subtitle_autoselect3 = ConfigSelection(choices=subtitle_language_choices,default="") confi... | config.autolanguage.subtitle_autoselect1 = ConfigSelection(choices=subtitle_language_choices,default="None") config.autolanguage.subtitle_autoselect2 = ConfigSelection(choices=subtitle_language_choices,default="None") config.autolanguage.subtitle_autoselect3 = ConfigSelection(choices=subtitle_language_choices,default="... | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
config.autolanguage.audio_autoselect1 = ConfigSelection(choices=audio_language_choices,default="") config.autolanguage.audio_autoselect2 = ConfigSelection(choices=audio_language_choices,default="") config.autolanguage.audio_autoselect3 = ConfigSelection(choices=audio_language_choices,default="") config.autolanguage.aud... | config.autolanguage.audio_autoselect1 = ConfigSelection(choices=audio_language_choices,default="None") config.autolanguage.audio_autoselect2 = ConfigSelection(choices=audio_language_choices,default="None") config.autolanguage.audio_autoselect3 = ConfigSelection(choices=audio_language_choices,default="None") config.auto... | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
def buildMovieListEntry(self, serviceref, info, begin, len): | def buildMovieListEntry(self, serviceref, info, begin, data): try: return self.really(serviceref, info, begin, data) except: import traceback traceback.print_exc() raise def really(self, serviceref, info, begin, data): | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
if len <= 0: | if (data == -1) or (data is None): data = MovieListData() | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
len = x[1].getLength(x[0]) else: len = 0 self.list[cur_idx] = (x[0], x[1], x[2], len) | data.len = x[1].getLength(x[0]) else: data.len = 0 self.list[cur_idx] = (x[0], x[1], x[2], data) data.txt = info.getName(serviceref) if config.usage.show_icons_in_movielist.value: data.icon = self.iconMovieNew cutsPathName = pathName + '.cuts' if os.path.exists(cutsPathName): part = moviePlayState(cutsPathName) if part... | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
txt = info.getName(serviceref) cutsPathName = pathName + '.cuts' | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] | |
icon = self.iconMovieNew if os.path.exists(cutsPathName): part = moviePlayState(cutsPathName) if part is not None: icon = self.iconPart[part] | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] | |
res.append(MultiContentEntryPixmapAlphaTest(pos=pos, size=(iconSize,20), png=icon)) else: icon = None | res.append(MultiContentEntryPixmapAlphaTest(pos=pos, size=(iconSize,20), png=data.icon)) else: | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
service = ServiceReference(info.getInfoString(serviceref, iServiceInformation.sServiceref)) description = info.getInfoString(serviceref, iServiceInformation.sDescription) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] | |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-182, 30), font = 0, flags = RT_HALIGN_LEFT, text=txt)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-182, 30), font = 0, flags = RT_HALIGN_LEFT, text=data.txt)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
if service is not None: res.append(MultiContentEntryText(pos=(200, 50), size=(200, 20), font = 1, flags = RT_HALIGN_LEFT, text = service.getServiceName())) else: if service is not None: res.append(MultiContentEntryText(pos=(width-180, 0), size=(180, 30), font = 2, flags = RT_HALIGN_RIGHT, text = service.getServiceName(... | if data.serviceName: res.append(MultiContentEntryText(pos=(200, 50), size=(200, 20), font = 1, flags = RT_HALIGN_LEFT, text = data.serviceName)) else: if data.serviceName: res.append(MultiContentEntryText(pos=(width-180, 0), size=(180, 30), font = 2, flags = RT_HALIGN_RIGHT, text = data.serviceName)) res.append(MultiCo... | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-140, 20), font = 0, flags = RT_HALIGN_LEFT, text = txt)) res.append(MultiContentEntryText(pos=(0, 20), size=(width-154-lenSize, 17), font=1, flags=RT_HALIGN_LEFT, text=description)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-140, 20), font = 0, flags = RT_HALIGN_LEFT, text = data.txt)) res.append(MultiContentEntryText(pos=(0, 20), size=(width-154-lenSize, 17), font=1, flags=RT_HALIGN_LEFT, text=data.description)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
if service is not None: res.append(MultiContentEntryText(pos=(width-154-lenSize, 20), size=(154, 17), font = 1, flags = RT_HALIGN_RIGHT, text = service.getServiceName())) | if data.serviceName: res.append(MultiContentEntryText(pos=(width-154-lenSize, 20), size=(154, 17), font = 1, flags = RT_HALIGN_RIGHT, text = data.serviceName)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-lenSize-22, 20), font = 0, flags = RT_HALIGN_LEFT, text = txt)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-lenSize-22, 20), font = 0, flags = RT_HALIGN_LEFT, text = data.txt)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
if service is not None: res.append(MultiContentEntryText(pos=(200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_LEFT, text = service.getServiceName())) else: if service is not None: res.append(MultiContentEntryText(pos=(width-200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_RIGHT, text = service.getServiceName... | if data.serviceName: res.append(MultiContentEntryText(pos=(200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_LEFT, text = data.serviceName)) else: if data.serviceName: res.append(MultiContentEntryText(pos=(width-200, 20), size=(200, 17), font = 1, flags = RT_HALIGN_RIGHT, text = data.serviceName)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-166, 25), font = 0, flags = RT_HALIGN_LEFT, text = txt)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-166, 25), font = 0, flags = RT_HALIGN_LEFT, text = data.txt)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-97, 25), font = 0, flags = RT_HALIGN_LEFT, text = txt)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-97, 25), font = 0, flags = RT_HALIGN_LEFT, text = data.txt)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] |
cmd = "tda1002x --init --scan --verbose --wakeup --inv 2 --bus " | tunername = nimmanager.getNimName(nim_idx) if tunername == "CXD1981": cmd = "cxd1978 --init --scan --verbose --wakeup --inv 2 --bus " else: cmd = "tda1002x --init --scan --verbose --wakeup --inv 2 --bus " | def startCableTransponderSearch(self, nim_idx): if not self.tryGetRawFrontend(nim_idx): self.session.nav.stopService() if not self.tryGetRawFrontend(nim_idx): if self.session.pipshown: # try to disable pip self.session.pipshown = False del self.session.pip if not self.tryGetRawFrontend(nim_idx): self.cableTransponderSe... |
self["Video"] = VideoWindow(decoder = 0) | desktopSize = getDesktop(0).size() self["Video"] = VideoWindow(decoder = 0, fb_width=desktopSize.width(), fb_height=desktopSize.height()) | def __init__(self, session, service): self.skin = CutListEditor.skin Screen.__init__(self, session) InfoBarSeek.__init__(self, actionmap = "CutlistSeekActions") InfoBarCueSheetSupport.__init__(self) InfoBarBase.__init__(self, steal_current_service = True) HelpableScreen.__init__(self) self.old_service = session.nav.get... |
from Components.ParentalControl import parentalControl | def __init__(self, session, csel): from Components.ParentalControl import parentalControl Screen.__init__(self, session) #raise Exception("we need a better summary screen here") self.csel = csel self.bsel = None | |
bus = nimmanager.getI2CDevice(nim_idx) if bus is None: print "ERROR: could not get I2C device for nim", nim_idx, "for cable transponder search" bus = 2 | try: bus = nimmanager.getI2CDevice(nim_idx) if bus is None: print "ERROR: could not get I2C device for nim", nim_idx, "for cable transponder search" bus = 2 except: if nim_idx < 2: if HardwareInfo().get_device_name() == "dm500hd": bus = 2 else: bus = nim_idx else: if nim_idx == 2: bus = 2 else: bus = 4 | def startCableTransponderSearch(self, nim_idx): if not self.tryGetRawFrontend(nim_idx): self.session.nav.stopService() if not self.tryGetRawFrontend(nim_idx): if self.session.pipshown: # try to disable pip self.session.pipshown = False del self.session.pip if not self.tryGetRawFrontend(nim_idx): self.cableTransponderSe... |
[u"q", u"w", u"e", u"r", u"t", u"z", u"u", u"i", u"o", u"p", u"+", u"@"], [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u" [u"<", u"y", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"-", u"CLEAR"], | [u"q", u"w", u"e", u"r", u"t", u"y", u"u", u"i", u"o", u"p", u"-", u"="], [u"a", u"s", u"d", u"f", u"g", u"h", u"j", u"k", u"l", u";", u"'", u"\\"], [u"[", u"z", u"x", u"c", u"v", u"b", u"n", u"m", u",", ".", u"/", u"CLEAR"], | def __init__(self, session, title="", text=""): Screen.__init__(self, session) self.keys_list = [] self.shiftkeys_list = [] self.lang = language.getLanguage() if self.lang == 'de_DE': self.keys_list = [ [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"], [u"q", u"w", u"e", u"r", u"t", u... |
[u"EXIT", u"!", u'"', u"", u"$", u"%", u"&", u"/", u"(", u")", u"=", u"BACKSPACE"], [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"*"], [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"'", u"?"], [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"], | [u"EXIT", u"!", u'@', u" [u"Q", u"W", u"E", u"R", u"T", u"Y", u"U", u"I", u"O", u"P", u"_", u"+"], [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u":", u"\"", u"|"], [u"]", u"Z", u"X", u"C", u"V", u"B", u"N", u"M", u"<", u">", u"?", u"CLEAR"], | def __init__(self, session, title="", text=""): Screen.__init__(self, session) self.keys_list = [] self.shiftkeys_list = [] self.lang = language.getLanguage() if self.lang == 'de_DE': self.keys_list = [ [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"], [u"q", u"w", u"e", u"r", u"t", u... |
("Croatian", "Croatian"), | ("Croatian hrv", "Croatian"), | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
("Polski", "Polish"), | ("Polski pol", "Polish"), | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
("Romanian", "Romanian"), | ("Romanian ron", "Romanian"), | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
("Serbian", "Serbian"), | ("Serbian srp", "Serbian"), | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
("Slovensko", "Slovenian"), | ("Slovensko slv", "Slovenian"), | def updateDemuxSize(el): enigma.setDemuxSize(int(el.value)) print "[SETTING] getDemuxSize=", enigma.getDemuxSize() |
def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None): | def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None, i2c = None, is_empty = False): | def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None): self.slot = slot |
return (self.frontend_id is not None) | return (self.frontend_id is not None) or self.__is_empty | def isSupported(self): return (self.frontend_id is not None) |
self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"])) | self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"], i2c = entry["i2c"], is_empty = entry["isempty"])) | def enumerateNIMs(self): # enum available NIMs. This is currently very dreambox-centric and uses the /proc/bus/nim_sockets interface. # the result will be stored into nim_slots. # the content of /proc/bus/nim_sockets looks like: # NIM Socket 0: # Type: DVB-S # Name: BCM4501 DVB-S2 NIM (internal) # NIM... |
print "using cached result" | def __init__(self): if HardwareInfo.device_name is not None: print "using cached result" return | |
def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None, i2c = None, is_empty = False): | def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None): | def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None, i2c = None, is_empty = False): self.slot = slot |
self.__is_empty = is_empty | def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None, i2c = None, is_empty = False): self.slot = slot | |
def isEmpty(self): return self.__is_empty | def isEmpty(self): return self.__is_empty | |
return (self.frontend_id is not None) or self.__is_empty | return (self.frontend_id is not None) | def isSupported(self): return (self.frontend_id is not None) or self.__is_empty |
entries[current_slot]["isempty"] = False | def enumerateNIMs(self): # enum available NIMs. This is currently very dreambox-centric and uses the /proc/bus/nim_sockets interface. # the result will be stored into nim_slots. # the content of /proc/bus/nim_sockets looks like: # NIM Socket 0: # Type: DVB-S # Name: BCM4501 DVB-S2 NIM (internal) # NIM... | |
entries[current_slot]["isempty"] = True | def enumerateNIMs(self): # enum available NIMs. This is currently very dreambox-centric and uses the /proc/bus/nim_sockets interface. # the result will be stored into nim_slots. # the content of /proc/bus/nim_sockets looks like: # NIM Socket 0: # Type: DVB-S # Name: BCM4501 DVB-S2 NIM (internal) # NIM... | |
self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"], i2c = entry["i2c"], is_empty = entry["isempty"])) | self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"])) | def enumerateNIMs(self): # enum available NIMs. This is currently very dreambox-centric and uses the /proc/bus/nim_sockets interface. # the result will be stored into nim_slots. # the content of /proc/bus/nim_sockets looks like: # NIM Socket 0: # Type: DVB-S # Name: BCM4501 DVB-S2 NIM (internal) # NIM... |
if str(k) != "": | if str(k).strip() != "": | def startElement(self, name, attrs): for x in ["text", "title", "value", "caption"]: try: attrlist.add((attrs[x], self.last_comment)) self.last_comment = None except KeyError: pass |
cmd += str(nim_idx) | if HardwareInfo().get_device_name() == "dm500hd": cmd += "2" else: cmd += str(nim_idx) | def startCableTransponderSearch(self, nim_idx): if not self.tryGetRawFrontend(nim_idx): self.session.nav.stopService() if not self.tryGetRawFrontend(nim_idx): if self.session.pipshown: # try to disable pip self.session.pipshown = False del self.session.pip if not self.tryGetRawFrontend(nim_idx): self.cableTransponderSe... |
"showEventInfoPlugin": (self.showEventInfoPlugins, _("show single service EPG...")), | "showEventInfoPlugin": (self.showEventInfoPlugins, _("list of EPG views...")), | def __init__(self): self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evUpdatedEventInfo: self.__evEventInfoChanged, }) |
screen_style_id = x.attrib.get('id', None) if screen_style_id is None and name.find('ummary') > 0: screen_style_id = 1 if screen_style_id is None or int(screen_style_id) == style_id: | screen_style_id = x.attrib.get('id', '-1') if screen_style_id == '-1' and name.find('ummary') > 0: screen_style_id = '1' if (style_id != 2 and int(screen_style_id) == -1) or int(screen_style_id) == style_id: | def lookupScreen(name, style_id): for (path, skin) in dom_skins: # first, find the corresponding screen element for x in skin.findall("screen"): if x.attrib.get('name', '') == name: screen_style_id = x.attrib.get('id', None) if screen_style_id is None and name.find('ummary') > 0: screen_style_id = 1 if screen_style_id ... |
screen_style_id = parsedSkin.attrib.get('id', None) if style_id != 2 or screen_style_id is None or int(screen_style_id) == style_id: | screen_style_id = parsedSkin.attrib.get('id', '-1') if (style_id != 2 and int(screen_style_id) == -1) or int(screen_style_id) == style_id: | def readSkin(screen, skin, names, desktop): if not isinstance(names, list): names = [names] name = "<embedded-in-'%s'>" % screen.__class__.__name__ style_id = desktop.getStyleID(); # try all skins, first existing one have priority for n in names: myscreen, path = lookupScreen(n, style_id) if myscreen is not None: # ... |
<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget s... | <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget s... | def setText(self, text): self["content"].setText(text) |
def check_for_NFO(self): | def check_for_NFO(self, nfifile=None): | def check_for_NFO(self): self.session.summary.setText(self["filelist"].getFilename()) if self["filelist"].getFilename() is None: return if self["filelist"].getCurrentDirectory() is not None: self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename() |
if self["filelist"].getFilename() is None: return if self["filelist"].getCurrentDirectory() is not None: self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename() | if nfifile is None: self.session.summary.setText(self["filelist"].getFilename()) if self["filelist"].getFilename() is None: return if self["filelist"].getCurrentDirectory() is not None: self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename() else: self.nfifile = nfifile | def check_for_NFO(self): self.session.summary.setText(self["filelist"].getFilename()) if self["filelist"].getFilename() is None: return if self["filelist"].getCurrentDirectory() is not None: self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename() |
self["infolabel"].text = _("No details for this image file") + ":\n" + self["filelist"].getFilename() | self["infolabel"].text = _("No details for this image file") + (self["filelist"].getFilename() or "") | def check_for_NFO(self): self.session.summary.setText(self["filelist"].getFilename()) if self["filelist"].getFilename() is None: return if self["filelist"].getCurrentDirectory() is not None: self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename() |
self.session.openWithCallback(self.queryCB, MessageBox, _("This .NFI file has a valid md5 signature. Continue programming this image to flash memory?"), MessageBox.TYPE_YESNO) | if self.wizard_mode: self.session.openWithCallback(self.queryCB, MessageBox, _("Shall the USB stick wizard proceed and program the image file %s into flash memory?" % self.nfifile.rsplit('/',1)[-1]), MessageBox.TYPE_YESNO) else: self.session.openWithCallback(self.queryCB, MessageBox, _("This .NFI file has a valid md5 s... | def md5finished(self, retval): if retval==0: self.session.openWithCallback(self.queryCB, MessageBox, _("This .NFI file has a valid md5 signature. Continue programming this image to flash memory?"), MessageBox.TYPE_YESNO) else: self.session.openWithCallback(self.queryCB, MessageBox, _("The md5sum validation failed, the ... |
def reboot(self): | def reboot(self, ret=None): | def reboot(self): if self.job.status == self.job.FINISHED: self["statusbar"].text = ("rebooting...") TryQuitMainloop(self.session,2) |
def restoreConfiguration(self): if self.configuration_restorable: from Screens.Console import Console cmdlist = [ "mount /dev/mtdblock/3 /mnt/realroot -t jffs2", "tar -xzvf " + self.configuration_restorable + " -C /mnt/realroot/" ] self.session.open(Console, title = "Restore running", cmdlist = cmdlist, finishedCallbac... | def reboot(self): if self.job.status == self.job.FINISHED: self["statusbar"].text = ("rebooting...") TryQuitMainloop(self.session,2) | |
if data.find('Downloading') == 0: | if data.startswith('Downloading'): | def parseLine(self, data): if self.currentCommand == self.CMD_LIST: item = data.split(' - ', 2) self.fetchedList.append(item) self.callCallbacks(self.EVENT_LISTITEM, item) else: if data.find('Downloading') == 0: self.callCallbacks(self.EVENT_DOWNLOAD, data.split(' ', 5)[1].strip()) elif data.find('Upgrading') == 0: if ... |
elif data.find('Upgrading') == 0: if self.opkgAvail: self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) else: self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) elif data.find('Installing') == 0: self.callCallbacks(self.EVENT_INSTALL, data.split(' ', 1)[1].split(' ')... | elif data.startswith('Upgrading'): self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 2)[1]) elif data.startswith('Installing'): self.callCallbacks(self.EVENT_INSTALL, data.split(' ', 2)[1]) elif data.startswith('Removing'): self.callCallbacks(self.EVENT_REMOVE, data.split(' ', 3)[2]) elif data.startswith('Configur... | def parseLine(self, data): if self.currentCommand == self.CMD_LIST: item = data.split(' - ', 2) self.fetchedList.append(item) self.callCallbacks(self.EVENT_LISTITEM, item) else: if data.find('Downloading') == 0: self.callCallbacks(self.EVENT_DOWNLOAD, data.split(' ', 5)[1].strip()) elif data.find('Upgrading') == 0: if ... |
elif data.find('Failed to download') == 0: | elif data.startswith('Failed to download'): | def parseLine(self, data): if self.currentCommand == self.CMD_LIST: item = data.split(' - ', 2) self.fetchedList.append(item) self.callCallbacks(self.EVENT_LISTITEM, item) else: if data.find('Downloading') == 0: self.callCallbacks(self.EVENT_DOWNLOAD, data.split(' ', 5)[1].strip()) elif data.find('Upgrading') == 0: if ... |
elif data.find('ipkg_download: ERROR:') == 0: | elif data.startswith('ipkg_download: ERROR:'): | def parseLine(self, data): if self.currentCommand == self.CMD_LIST: item = data.split(' - ', 2) self.fetchedList.append(item) self.callCallbacks(self.EVENT_LISTITEM, item) else: if data.find('Downloading') == 0: self.callCallbacks(self.EVENT_DOWNLOAD, data.split(' ', 5)[1].strip()) elif data.find('Upgrading') == 0: if ... |
if self.current: | if isinstance(self.current,tuple) and len(self.current) == 2: | def selectionChanged(self): if self.current: self.current[1].onDeselect(self.session) self.current = self.getCurrent() if self.current: self.current[1].onSelect(self.session) |
else: return | def selectionChanged(self): if self.current: self.current[1].onDeselect(self.session) self.current = self.getCurrent() if self.current: self.current[1].onSelect(self.session) | |
if self.current: | if isinstance(self.current,tuple) and len(self.current) == 2: | def preWidgetRemove(self, instance): if self.current: self.current[1].onDeselect(self.session) instance.selectionChanged.get().remove(self.selectionChanged) instance.setContent(None) |
if len(rtfiles) == 2: | if len(rtfiles) == 2 or len(rtfiles) == 5: | def detectWlanModule(self): self.wlanmodule = None rt73_dir = "/sys/bus/usb/drivers/rt73/" zd1211b_dir = "/sys/bus/usb/drivers/zd1211b/" madwifi_dir = "/sys/bus/pci/drivers/ath_pci/" if os_path.exists(madwifi_dir): files = listdir(madwifi_dir) if len(files) >= 1: self.wlanmodule = 'madwifi' if os_path.exists(rt73_dir):... |
if len(zdfiles) == 1: | if len(zdfiles) == 1 or len(zdfiles) == 5: | def detectWlanModule(self): self.wlanmodule = None rt73_dir = "/sys/bus/usb/drivers/rt73/" zd1211b_dir = "/sys/bus/usb/drivers/zd1211b/" madwifi_dir = "/sys/bus/pci/drivers/ath_pci/" if os_path.exists(madwifi_dir): files = listdir(madwifi_dir) if len(files) >= 1: self.wlanmodule = 'madwifi' if os_path.exists(rt73_dir):... |
self.addCurrentServiceToBouquet(bouquets[0][1]) | self.addCurrentServiceToBouquet(bouquets[0][1], closeBouquetSelection = False) | def addServiceToBouquetSelected(self): bouquets = self.csel.getBouquetList() if bouquets is None: cnt = 0 else: cnt = len(bouquets) if cnt > 1: # show bouquet list self.bsel = self.session.openWithCallback(self.bouquetSelClosed, BouquetSelector, bouquets, self.addCurrentServiceToBouquet) elif cnt == 1: # add to only on... |
def addCurrentServiceToBouquet(self, dest): | def addCurrentServiceToBouquet(self, dest, closeBouquetSelection = True): | def addCurrentServiceToBouquet(self, dest): self.csel.addServiceToBouquet(dest) if self.bsel is not None: self.bsel.close(True) else: self.close(True) # close bouquet selection |
self.close(True) | self.close(closeBouquetSelection) | def addCurrentServiceToBouquet(self, dest): self.csel.addServiceToBouquet(dest) if self.bsel is not None: self.bsel.close(True) else: self.close(True) # close bouquet selection |
"keyTV": self.closeRadio, "keyRadio": self.closeRadio, "cancel": self.closeRadio, | "keyTV": self.cancel, "keyRadio": self.cancel, "cancel": self.cancel, | def __init__(self, session, infobar): ChannelSelectionBase.__init__(self, session) ChannelSelectionEdit.__init__(self) ChannelSelectionEPG.__init__(self) InfoBarBase.__init__(self) self.infobar = infobar self.onLayoutFinish.append(self.onCreate) |
def closeRadio(self): | def cancel(self): | def closeRadio(self): self.infobar.rds_display.onRassInteractivePossibilityChanged.remove(self.RassInteractivePossibilityChanged) self.info.hide() #set previous tv service self.close(None) |
append_when_current_valid(current, menu, (_("add service to bouquet"), self.addServiceToBouquetSelected), level = 0) | bouquets = self.csel.getBouquetList() if bouquets is None: bouquetCnt = 0 else: bouquetCnt = len(bouquets) if not inBouquet or bouquetCnt > 1: append_when_current_valid(current, menu, (_("add service to bouquet"), self.addServiceToBouquetSelected), level = 0) | def __init__(self, session, csel): Screen.__init__(self, session) #raise Exception("we need a better summary screen here") self.csel = csel self.bsel = None |
append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0) | if not inBouquet: append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0) | def __init__(self, session, csel): Screen.__init__(self, session) #raise Exception("we need a better summary screen here") self.csel = csel self.bsel = None |
print "add", cur_service.toString(), "to new alternatives failed" | print "add", cur_service.ref.toString(), "to new alternatives failed" | def addAlternativeServices(self): cur_service = ServiceReference(self.getCurrentSelection()) root = self.getRoot() cur_root = root and ServiceReference(root) mutableBouquet = cur_root.list().startEdit() if mutableBouquet: name = cur_service.getServiceName() print "NAME", name if self.mode == MODE_TV: str = '1:134:1:0:0... |
self.oldlist = None | self.oldlist = {} | def __init__(self, session, iface): Screen.__init__(self, session) self.session = session self.iface = iface self.skin_path = plugin_path self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") self.APList = None self.newAPList = None self.WlanList = None self.cleanList = None self.oldlist = None self.l... |
self.oldlist = [] self.oldlist = self.cleanList | newList = [] newList = self.getAccessPoints(refresh = True) | def updateAPList(self): self.oldlist = [] self.oldlist = self.cleanList self.newAPList = [] newList = [] tmpList = [] newListIndex = None currentListEntry = None currentListIndex = None newList = self.getAccessPoints(refresh = True) for oldentry in self.oldlist: if oldentry not in newList: newList.append(oldentry) |
newList = [] | def updateAPList(self): self.oldlist = [] self.oldlist = self.cleanList self.newAPList = [] newList = [] tmpList = [] newListIndex = None currentListEntry = None currentListIndex = None newList = self.getAccessPoints(refresh = True) for oldentry in self.oldlist: if oldentry not in newList: newList.append(oldentry) | |
newList = self.getAccessPoints(refresh = True) for oldentry in self.oldlist: if oldentry not in newList: newList.append(oldentry) for newentry in newList: if newentry[1] == "hidden...": continue tmpList.append(newentry) | for ap in self.oldlist.keys(): data = self.oldlist[ap]['data'] if data is not None: tmpList.append(data) | def updateAPList(self): self.oldlist = [] self.oldlist = self.cleanList self.newAPList = [] newList = [] tmpList = [] newListIndex = None currentListEntry = None currentListIndex = None newList = self.getAccessPoints(refresh = True) for oldentry in self.oldlist: if oldentry not in newList: newList.append(oldentry) |
if entry == currentListEntry: | if entry[0] == currentListEntry[0]: | def updateAPList(self): self.oldlist = [] self.oldlist = self.cleanList self.newAPList = [] newList = [] tmpList = [] newListIndex = None currentListEntry = None currentListIndex = None newList = self.getAccessPoints(refresh = True) for oldentry in self.oldlist: if oldentry not in newList: newList.append(oldentry) |
self.setSelectedSubtitle(False) | if subtitle: subtitle.disableSubtitles(self.subtitle_window.instance) self.__selected_subtitle = False self.__subtitles_enabled = False self.subtitle_window.hide() | def __updatedInfo(self): subtitle = self.getCurrentServiceSubtitle() if self.__subtitles_enabled: self.setSelectedSubtitle(False) self.setSelectedSubtitle(subtitle and subtitle.getCachedSubtitle()) if self.__selected_subtitle: self.setSubtitlesEnable(True) |
self.restoreService(_("Zap back to service before tuner setup?")) | 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... | |
else: self.restoreService(_("Zap back to service before tuner setup?")) | def deleteConfirmed(self, confirmed): if confirmed[1] == "yes" or confirmed[1] == "yestoall": eDVBDB.getInstance().removeServices(-1, -1, -1, self.satpos_to_remove) | |
self.args += [device, mountpoint, "-orw,sync"] | options = "rw,sync" self.mountpoint = mountpoint self.args += [ device, mountpoint, "-o"+options ] | def __init__(self, job, device, mountpoint): Task.__init__(self, job, ("mount")) self.setTool("mount") self.args += [device, mountpoint, "-orw,sync"] self.weighting = 1 |
self.delayTimer.start(1000, False) | self.delayTimer.start(950, False) | def run(self, callback): Task.run(self, callback) self.delayTimer.start(1000, False) |
self.session.openWithCallback(self.StickWizardCB, JobView, job) | job_manager.failed_jobs = [] self.session.openWithCallback(self.StickWizardCB, JobView, job, afterEventChangeable = False) | def ackedDestination(self): print "[ackedDestination]", self.branch, self.target_dir, self.target_dir[8:] self.container.setCWD("/mnt") if self.target_dir[:8] == "/autofs/": self.target_dir = "/dev/" + self.target_dir[8:-1] |
print "[getImage] start downloading %s to %s" % (url, path) | print "[getImage] start downloading %s to %s" % (url, filename) | def ackedDestination(self): print "[ackedDestination]", self.branch, self.target_dir, self.target_dir[8:] self.container.setCWD("/mnt") if self.target_dir[:8] == "/autofs/": self.target_dir = "/dev/" + self.target_dir[8:-1] |
self.session.openWithCallback(self.ImageDownloadCB, JobView, job) | job_manager.failed_jobs = [] self.session.openWithCallback(self.ImageDownloadCB, JobView, job, afterEventChangeable = False) | def ackedDestination(self): print "[ackedDestination]", self.branch, self.target_dir, self.target_dir[8:] self.container.setCWD("/mnt") if self.target_dir[:8] == "/autofs/": self.target_dir = "/dev/" + self.target_dir[8:-1] |
self.session.open(MessageBox, _("The USB stick was prepared to be bootable.\nNow you can download an NFI image file!"), type = MessageBox.TYPE_INFO) | def StickWizardCB(self, ret=None): self.session.open(MessageBox, _("The USB stick was prepared to be bootable.\nNow you can download an NFI image file!"), type = MessageBox.TYPE_INFO) print "[StickWizardCB]", ret if len(self.feedlists[ALLIMAGES]) == 0: self.getFeed() else: self.setMenu() | |
if len(self.feedlists[ALLIMAGES]) == 0: self.getFeed() else: self.setMenu() | print job_manager.active_jobs, job_manager.failed_jobs, job_manager.job_classes, job_manager.in_background, job_manager.active_job if len(job_manager.failed_jobs) == 0: self.session.open(MessageBox, _("The USB stick was prepared to be bootable.\nNow you can download an NFI image file!"), type = MessageBox.TYPE_INFO) if... | def StickWizardCB(self, ret=None): self.session.open(MessageBox, _("The USB stick was prepared to be bootable.\nNow you can download an NFI image file!"), type = MessageBox.TYPE_INFO) print "[StickWizardCB]", ret if len(self.feedlists[ALLIMAGES]) == 0: self.getFeed() else: self.setMenu() |
self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the... | print job_manager.active_jobs, job_manager.failed_jobs, job_manager.job_classes, job_manager.in_background, job_manager.active_job if len(job_manager.failed_jobs) == 0: self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug... | def ImageDownloadCB(self, ret): print "[ImageDownloadCB]", ret self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for... |
if cnt > 1: if withCallback: self.bouquetSel = self.session.openWithCallback(self.closed, BouquetSelector, bouquets, self.openBouquetEPG, enableWrapAround=True) self.dlg_stack.append(self.bouquetSel) else: self.bouquetSel = self.session.open(BouquetSelector, bouquets, self.openBouquetEPG, enableWrapAround=True) elif cn... | if cnt > 1: self.bouquetSel = SilentBouquetSelector(bouquets, True, self.servicelist.getBouquetNumOffset(root)) if cnt >= 1: self.openBouquetEPG(root, withCallback) | def openMultiServiceEPG(self, withCallback=True): bouquets = self.servicelist.getBouquetList() if bouquets is None: cnt = 0 else: cnt = len(bouquets) if cnt > 1: # show bouquet list if withCallback: self.bouquetSel = self.session.openWithCallback(self.closed, BouquetSelector, bouquets, self.openBouquetEPG, enableWrapAr... |
iSoftwareTools.getUpdates(self.getUpdateInfosCB) | iSoftwareTools.startSoftwareTools(self.getUpdateInfosCB) | def getUpdateInfos(self): self.setState('update') iSoftwareTools.getUpdates(self.getUpdateInfosCB) |
self.rebuildList() | def getUpdateInfosCB(self, retval = None): if retval is not None: if retval is True: if iSoftwareTools.available_updates is not 0: self["status"].setText(_("There are at least ") + str(iSoftwareTools.available_updates) + _(" updates available.")) else: self["status"].setText(_("There are no updates available.")) elif r... | |
def autostart(reason, **kwargs): if reason is True: iSoftwareTools.startSoftwareTools() | def autostart(reason, **kwargs): if reason is True: iSoftwareTools.startSoftwareTools() | |
"INVERSION_ON" : parm.Inversion_On } | "INVERSION_ON" : parm.Inversion_On, "INVERSION_AUTO" : parm.Inversion_Unknown } | def getCableTransponderData(self, str): data = str.split() if len(data): if data[0] == 'OK': print str parm = eDVBFrontendParametersCable() qam = { "QAM16" : parm.Modulation_QAM16, "QAM32" : parm.Modulation_QAM32, "QAM64" : parm.Modulation_QAM64, "QAM128" : parm.Modulation_QAM128, "QAM256" : parm.Modulation_QAM256 } in... |
bouquetSel = Session.openWithCallback(closed, BouquetSelector, bouquets, openBouquetEPG, enableWrapAround=True) dlg_stack.append(bouquetSel) elif cnt == 1: if not openBouquetEPG(bouquets[0][1]): | bouquetSel = SilentBouquetSelector(bouquets, True, Servicelist.getBouquetNumOffset(root)) if cnt >= 1: if not openBouquetEPG(root): | def main(session, servicelist, **kwargs): global Session Session = session global Servicelist Servicelist = servicelist bouquets = Servicelist.getBouquetList() if bouquets is None: cnt = 0 else: cnt = len(bouquets) if cnt > 1: # show bouquet list global bouquetSel bouquetSel = Session.openWithCallback(closed, BouquetSe... |
self.text = text | self.text = text.decode("utf-8") | def __init__(self, session, title="", text=""): Screen.__init__(self, session) self.keys_list = [] self.shiftkeys_list = [] self.lang = language.getLanguage() if self.lang == 'de_DE': self.keys_list = [ [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"], [u"q", u"w", u"e", u"r", u"t", u... |
self["text"] = Label(self.text) | self["text"] = Label(text) | def __init__(self, session, title="", text=""): Screen.__init__(self, session) self.keys_list = [] self.shiftkeys_list = [] self.lang = language.getLanguage() if self.lang == 'de_DE': self.keys_list = [ [u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"], [u"q", u"w", u"e", u"r", u"t", u... |
self.text = self["text"].getText()[:-1] self["text"].setText(self.text) | self.text = self.text[:-1] self["text"].setText(self.text.encode("utf-8")) | def backClicked(self): self.text = self["text"].getText()[:-1] self["text"].setText(self.text) |
text = text.encode("utf-8") | def okClicked(self): if self.shiftMode: list = self.shiftkeys_list else: list = self.keys_list selectedKey = self.selectedKey | |
self.text = self["text"].getText()[:-1] self["text"].setText(self.text) | self.text = self.text[:-1] self["text"].setText(self.text.encode("utf-8")) | def okClicked(self): if self.shiftMode: list = self.shiftkeys_list else: list = self.keys_list selectedKey = self.selectedKey |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.