rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
components = {} doGlobal(components)
def dump(dir, p = ""): if isinstance(dir, dict): for (entry, val) in dir.items(): dump(val, p + "(dict)/" + entry) if hasattr(dir, "__dict__"): for name, value in dir.__dict__.items(): if not had.has_key(str(value)): had[str(value)] = 1 dump(value, p + "/" + str(name)) else: print p + "/" + str(name) + ":" + str(dir.__...
session.open(infoBar)
session.open(Screens.InfoBar.InfoBar)
def runScreenTest(): session = Session() session.desktop = getDesktop() session.nav = Navigation() session.open(infoBar) CONNECT(keyPressedSignal(), session.keyEvent) runMainloop() return 0
service.setName("%s (%3.1f" + _("W") + ")" %(str, (0 - (orbpos - 3600)) / 10.0))
orbpos = 3600 - orbpos h = _("W")
def showSatellites(self): if not self.pathChangedDisabled: refstr = '%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types) if not self.preEnterPath(refstr): ref = eServiceReference(refstr) justSet=False prev = None
service.setName("%s (%3.1f" + _("E") + ")" % (str, orbpos / 10.0))
h = _("E") n = ("%s (%d.%d" + h + ")") % (service_name, orbpos / 10, orbpos % 10) service.setName(n)
def showSatellites(self): if not self.pathChangedDisabled: refstr = '%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types) if not self.preEnterPath(refstr): ref = eServiceReference(refstr) justSet=False prev = None
self["ServiceListBrowse"].root = refttobrowse
self["ServiceListBrowse"].root = reftobrowse
def browseTo(self, reftobrowse): self["ServiceListBrowse"].root = refttobrowse
if (config.network.dhcp.value == 1):
if (currentConfigSelectionElement(config.network.dhcp) == "yes"):
def writeNetworkConfig(self): # fixme restarting and updating the network too often. possible fix: check current config and execute only if changed :/ # fixme using interfaces.tmp instead of interfaces for now fp = file('/etc/network/interfaces', 'w') fp.write("auto eth0\n") if (config.network.dhcp.value == 1): fp.writ...
if config.network.dhcp.value == 0:
if (currentConfigSelectionElement(config.network.dhcp) == "yes"):
def writeNetworkConfig(self): # fixme restarting and updating the network too often. possible fix: check current config and execute only if changed :/ # fixme using interfaces.tmp instead of interfaces for now fp = file('/etc/network/interfaces', 'w') fp.write("auto eth0\n") if (config.network.dhcp.value == 1): fp.writ...
pass
print "[Network.py] loading network files failed"
def loadNetworkConfig(self): try: # parse the interfaces-file fp = file('/etc/network/interfaces', 'r') interfaces = fp.readlines() fp.close() ifaces = {} currif = "" for i in interfaces: split = i.strip().split(' ') if (split[0] == "iface"): currif = split[1] ifaces[currif] = {} if (len(split) == 4 and split[3] == "d...
config.network.nameserver.value = map(int, split[1].split('.'))
config.network.dns.value = map(int, split[1].split('.'))
def loadNetworkConfig(self): try: # parse the interfaces-file fp = file('/etc/network/interfaces', 'r') interfaces = fp.readlines() fp.close() ifaces = {} currif = "" for i in interfaces: split = i.strip().split(' ') if (split[0] == "iface"): currif = split[1] ifaces[currif] = {} if (len(split) == 4 and split[3] == "d...
pass
print "[Network.py] resolv.conf parsing failed"
def loadNetworkConfig(self): try: # parse the interfaces-file fp = file('/etc/network/interfaces', 'r') interfaces = fp.readlines() fp.close() ifaces = {} currif = "" for i in interfaces: split = i.strip().split(' ') if (split[0] == "iface"): currif = split[1] ifaces[currif] = {} if (len(split) == 4 and split[3] == "d...
pass
print "[Network.py] parsing network failed"
def loadNetworkConfig(self): try: # parse the interfaces-file fp = file('/etc/network/interfaces', 'r') interfaces = fp.readlines() fp.close() ifaces = {} currif = "" for i in interfaces: split = i.strip().split(' ') if (split[0] == "iface"): currif = split[1] ifaces[currif] = {} if (len(split) == 4 and split[3] == "d...
print "jumpPreviousMark"
def jumpPreviousMark(self): print "jumpPreviousMark" # we add 2 seconds, so if the play position is <2s after # the mark, the mark before will be used self.jumpPreviousNextMark(lambda x: -x-5*90000, alternative=0)
print "jumpNextMark"
def jumpNextMark(self): print "jumpNextMark" self.jumpPreviousNextMark(lambda x: x)
print "toggleMark"
def toggleMark(self): print "toggleMark" current_pos = self.__getCurrentPosition() if current_pos is None: print "not seekable" return print "current position: ", current_pos
print "current position: ", current_pos
def toggleMark(self): print "toggleMark" current_pos = self.__getCurrentPosition() if current_pos is None: print "not seekable" return print "current position: ", current_pos
print "nearest_cutpoint: ", nearest_cutpoint
def toggleMark(self): print "toggleMark" current_pos = self.__getCurrentPosition() if current_pos is None: print "not seekable" return print "current position: ", current_pos
self.removeMark(self, *nearest_cutpoint) else: self.addMark(self, current_pos, self.CUT_TYPE_MARK) def addMark(self, where, type): bisect.insort(self.cut_list, (current_pos, self.CUT_TYPE_MARK))
self.removeMark(nearest_cutpoint) else: self.addMark((current_pos, self.CUT_TYPE_MARK)) def addMark(self, point): bisect.insort(self.cut_list, point)
def toggleMark(self): print "toggleMark" current_pos = self.__getCurrentPosition() if current_pos is None: print "not seekable" return print "current position: ", current_pos
def removeMark(self, where, type): self.cut_list.remove(nearest_cutpoint)
def removeMark(self, point): self.cut_list.remove(point)
def removeMark(self, where, type): self.cut_list.remove(nearest_cutpoint) self.uploadCuesheet()
print "cuts:", self.cut_list
def downloadCuesheet(self): cue = self.__getCuesheet()
if config.usage.e1like_radio_mode.value == "yes":
if config.usage.e1like_radio_mode.value:
def setModeRadio(self): if self.revertMode is None and config.servicelist.lastmode.value == "tv": self.revertMode = MODE_TV if config.usage.e1like_radio_mode.value == "yes": self.history = self.history_radio self.lastservice = config.radio.lastservice self.lastroot = config.radio.lastroot config.servicelist.lastmode.va...
if config.usage.e1like_radio_mode.value == "yes":
if config.usage.e1like_radio_mode.value:
def __onCreate(self): if config.usage.e1like_radio_mode.value == "yes": if config.servicelist.lastmode.value == "tv": self.setModeTv() else: self.setModeRadio() else: self.setModeTv() lastservice=eServiceReference(self.lastservice.value) if lastservice.valid(): self.zap()
res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 200, 25, 0, RT_HALIGN_LEFT , name)) res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 26, 200, 17, 1, RT_HALIGN_LEFT , desc))
res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 300, 25, 0, RT_HALIGN_LEFT , name)) res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 26, 300, 17, 1, RT_HALIGN_LEFT , desc))
def PluginEntryComponent(picture, name, desc = "Plugin"): res = [ None ] res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 200, 25, 0, RT_HALIGN_LEFT , name)) res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 26, 200, 17, 1, RT_HALIGN_LEFT , desc)) png = loadPNG(picture) if png == None: png = loadPNG(resolve...
if currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) == "advanced": self.fillAdvancedList()
def keySave(self): if currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) == "advanced": self.fillAdvancedList() self.run() self.close()
print "[config.py] orgstring: ", self.parent.vals[self.parent.value] print "[config.py] translation: ", _(self.parent.vals[self.parent.value])
def __call__(self, selected): #needed by configlist self.checkValues() print "[config.py] orgstring: ", self.parent.vals[self.parent.value] print "[config.py] translation: ", _(self.parent.vals[self.parent.value]) return ("text", _(self.parent.vals[self.parent.value]))
elif type != self.TYPE_YESNO:
if type != self.TYPE_YESNO:
def __init__(self, session, text, type = TYPE_YESNO): self.type = type Screen.__init__(self, session) self["text"] = Label(text) self["ErrorPixmap"] = Pixmap() self["QuestionPixmap"] = Pixmap() self["InfoPixmap"] = Pixmap() self.list = [] if type != self.TYPE_ERROR: self["ErrorPixmap"].hide() elif type != self.TYPE_...
elif type != self.TYPE_INFO:
if type != self.TYPE_INFO:
def __init__(self, session, text, type = TYPE_YESNO): self.type = type Screen.__init__(self, session) self["text"] = Label(text) self["ErrorPixmap"] = Pixmap() self["QuestionPixmap"] = Pixmap() self["InfoPixmap"] = Pixmap() self.list = [] if type != self.TYPE_ERROR: self["ErrorPixmap"].hide() elif type != self.TYPE_...
ref = eServiceReference(ref) self.ref = ref
self.ref = eServiceReference(ref) else: self.ref = ref
def __init__(self, ref): if isinstance(ref, str): ref = eServiceReference(ref) self.ref = ref self.serviceHandler = eServiceCenter.getInstance()
print "negative"
def startElement(self, name, attrs): if (name == "sat"): #print "found sat " + attrs.get('name',"") + " " + str(attrs.get('position',"")) tpos = int(attrs.get('position',"")) if tpos < 0: print "negative" tpos = 3600 + tpos print "[NimManager.py] tpos:", tpos tname = attrs.get('name',"") self.satellites[tpos] = tname s...
print "[NimManager.py] tpos:", tpos
def startElement(self, name, attrs): if (name == "sat"): #print "found sat " + attrs.get('name',"") + " " + str(attrs.get('position',"")) tpos = int(attrs.get('position',"")) if tpos < 0: print "negative" tpos = 3600 + tpos print "[NimManager.py] tpos:", tpos tname = attrs.get('name',"") self.satellites[tpos] = tname s...
for x in [InfoBarShowHide, InfoBarMenu, InfoBarServiceName, InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, InfoBarTimeshiftState, InfoBarSubtitleSupport]:
for x in [InfoBarShowHide, InfoBarMenu, InfoBarServiceName, InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, InfoBarTimeshiftState, InfoBarSubtitleSupport, InfoBarExtensions]:
def __init__(self, session, subservices): Screen.__init__(self, session) for x in [InfoBarShowHide, InfoBarMenu, InfoBarServiceName, InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, InfoBarTimeshiftState, InfoBarSubtitleSupport]: x.__init__(self) InfoBarExtensions.__init__(self, useServicePath = False)
InfoBarExtensions.__init__(self, useServicePath = False)
def __init__(self, session, subservices): Screen.__init__(self, session) for x in [InfoBarShowHide, InfoBarMenu, InfoBarServiceName, InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, InfoBarTimeshiftState, InfoBarSubtitleSupport]: x.__init__(self) InfoBarExtensions.__init__(self, useServicePath = False)
print "You actually pressed a number (" + str(number) + ") which will be added at block number " + str(blocknumber) + " on position " + str(posinblock) print "Old value: " + str(oldvalue) + " olddec: " + str(olddec) + " newvalue: " + str(newvalue)
def handleKey(self, key): #this will no change anything on the value itself #so we can handle it here in gui element if key == config.key["prevElement"]: self.markedPos -= 1 if key == config.key["nextElement"]: self.markedPos += 1 if key >= config.key["0"] and key <= config.key["9"]: self.blockLen = [] for x in self.v...
print "markPos:", print self.markedPos
def handleKey(self, key): #this will no change anything on the value itself #so we can handle it here in gui element if key == config.key["prevElement"]: self.markedPos -= 1 if key == config.key["nextElement"]: self.markedPos += 1 if key >= config.key["0"] and key <= config.key["9"]: self.blockLen = [] for x in self.v...
print "Positon: " + str(mPos)
def __call__(self, selected): #needed by configlist value = "" mPos = self.markedPos print "Positon: " + str(mPos) num = 0; for i in self.parent.value: if len(value): #fixme no heading separator possible value += self.seperator if mPos >= len(value) - 1: mPos += 1 #diff = self.valueBounds - len(str(i)) #if diff > 0...
print (("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % i)
def __call__(self, selected): #needed by configlist value = "" mPos = self.markedPos print "Positon: " + str(mPos) num = 0; for i in self.parent.value: if len(value): #fixme no heading separator possible value += self.seperator if mPos >= len(value) - 1: mPos += 1 #diff = self.valueBounds - len(str(i)) #if diff > 0...
print self.parent
def nextEntry(self): print self.parent self.parent.vals[1](self.parent.getConfigPath())
eDVBCI_UI.getInstance().answerMenu(self.slotid, self["entries"].getCurrent()[1])
cur = self["entries"].getCurrent() if cur: eDVBCI_UI.getInstance().answerMenu(self.slotid, cur[1]) else: eDVBCI_UI.getInstance().answerMenu(self.slotid, 0)
def okbuttonClick(self): print "ok" if self.tag == "WAIT": print "do nothing - wait" elif self.tag == "MENU": print "answer MENU" eDVBCI_UI.getInstance().answerMenu(self.slotid, self["entries"].getCurrent()[1]) self.showWait() elif self.tag == "LIST": print "answer LIST" eDVBCI_UI.getInstance().answerMenu(self.slotid, ...
def execBegin(self):
def execBegin(self, first=True):
def execBegin(self): assert not self.in_exec self.in_exec = True c = self.current_dialog self.pushSummary()
self.pushSummary() summary = c.createSummary() or SimpleSummary self.summary = self.instantiateSummaryDialog(summary, c) self.summary.show() c.addSummary(self.summary)
if first: self.pushSummary() summary = c.createSummary() or SimpleSummary self.summary = self.instantiateSummaryDialog(summary, c) self.summary.show() c.addSummary(self.summary)
def execBegin(self): assert not self.in_exec self.in_exec = True c = self.current_dialog self.pushSummary()
def execEnd(self):
def execEnd(self, last=True):
def execEnd(self): assert self.in_exec self.in_exec = False
self.current_dialog.removeSummary(self.summary) self.popSummary()
if last: self.current_dialog.removeSummary(self.summary) self.popSummary()
def execEnd(self): assert self.in_exec self.in_exec = False
self.execEnd()
self.execEnd(last=False)
def pushCurrent(self): if self.current_dialog is not None: self.dialog_stack.append(self.current_dialog) self.execEnd()
self.execBegin()
self.execBegin(first=False)
def popCurrent(self): if len(self.dialog_stack): self.current_dialog = self.dialog_stack.pop() self.execBegin() else: self.current_dialog = None
maxPos = len(self.parent.value) * len(self.valueBounds) + len(self.parent.value)
maxPos = 0 num = 0 for i in self.parent.value: maxPos += len(str(self.valueBounds[num][1])) num += 1
def checkValues(self): maxPos = len(self.parent.value) * len(self.valueBounds) + len(self.parent.value) if self.markedPos >= maxPos: self.markedPos = maxPos - 1 if self.markedPos < 0: self.markedPos = 0
print (("%0" + str(len(str(self.valueBounds[0][1]))) + "d") % i) value += ("%0" + str(len(str(self.valueBounds[0][1]))) + "d") % i
print (("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % i) value += ("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % i num += 1
def __call__(self, selected): #needed by configlist value = "" mPos = self.markedPos print "Positon: " + str(mPos) for i in self.parent.value: if len(value): #fixme no heading separator possible value += self.seperator if mPos >= len(value) - 1: mPos += 1 #diff = self.valueBounds - len(str(i)) #if diff > 0: ## if t...
i = str(len(self))
def append(self, item): list.append(self, item) i = str(len(self)) if i in self.stored_values: item.saved_value = self.stored_values[i] item.load()
else: self.addCurrentServiceToBouquet(self.csel.bouquet_root)
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...
serviceCount=0 bouquets = [ ] serviceHandler = eServiceCenter.getInstance()
def getBouquetList(self): if config.usage.multibouquet.value: serviceCount=0 bouquets = [ ] serviceHandler = eServiceCenter.getInstance() list = serviceHandler.list(self.bouquet_root) if not list is None: while True: s = list.getNext() if not s.valid(): break if ((s.flags & eServiceReference.flagDirectory) == eServiceR...
else: serviceCount += 1 if len(bouquets) == 0 and serviceCount > 0: info = serviceHandler.info(self.bouquet_root) if not info is None: bouquets.append((info.getName(self.bouquet_root), self.bouquet_root))
def getBouquetList(self): if config.usage.multibouquet.value: serviceCount=0 bouquets = [ ] serviceHandler = eServiceCenter.getInstance() list = serviceHandler.list(self.bouquet_root) if not list is None: while True: s = list.getNext() if not s.valid(): break if ((s.flags & eServiceReference.flagDirectory) == eServiceR...
for x in s.getSubtitleList():
l = s and s.getSubtitleList() or [ ] for x in l:
def extensions(self): list = [] if self.pipshown == False: list.append((_("Activate Picture in Picture"), self.PIPON)) elif self.pipshown == True: list.append((_("Disable Picture in Picture"), self.PIPOFF)) list.append((_("Move Picture in Picture"), self.MOVEPIP)) list.append((_("Swap services"), self.PIPSWAP)) s = se...
subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle)
subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle[1])
def setSubtitlesEnable(self, enable=True): subtitle = self.getCurrentServiceSubtitle() if enable and self.__selected_subtitle: if subtitle and not self.__subtitles_enabled: subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle) self.subtitle_window.show() self.__subtitles_enabled = True else: i...
self["CurrentTime"] = ServicePosition(self.session.nav, ServicePosition.TYPE_REMAINING)
self["CurrentTime"] = Clock()
def __init__(self, session): Screen.__init__(self, session)
while 1: self["list"].instance.moveSelection(self["list"].instance.moveUp) if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == 0: break
if len(self["list"].list) > 0: while 1: self["list"].instance.moveSelection(self["list"].instance.moveUp) if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == 0: break
def up(self): while 1: self["list"].instance.moveSelection(self["list"].instance.moveUp) if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == 0: break
while 1: self["list"].instance.moveSelection(self["list"].instance.moveDown) if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == len(self["list"].list) - 1: break
if len(self["list"].list) > 0: while 1: self["list"].instance.moveSelection(self["list"].instance.moveDown) if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == len(self["list"].list) - 1: break
def down(self): while 1: self["list"].instance.moveSelection(self["list"].instance.moveDown) if self["list"].l.getCurrentSelection()[0][0] != "--" or self["list"].l.getCurrentSelectionIndex() == len(self["list"].list) - 1: break
self.close(self["list"].l.getCurrentSelection()[0])
if len(self["list"].list) > 0: self.close(self["list"].l.getCurrentSelection()[0]) else: self.close(None)
def go(self): self.close(self["list"].l.getCurrentSelection()[0]) #self.close(self["input"].getText())
print "****************************** Start blinking"
def startBlinking(self): print "****************************** Start blinking" self.blinking = True self.timer.start(self.blinktime)
print "****************************** Stop blinking"
def stopBlinking(self): print "****************************** Stop blinking" self.blinking = False if (self.state == self.SHOWN): self.hideWidget() self.timer.stop()
parser = make_parser()
def readSatsfromFile(self): self.satellites = { } self.transponders = { } self.transponderscable = { } self.transpondersterrestrial = { }
parser = make_parser()
def readSatsfromFile(self): self.satellites = { } self.transponders = { } self.transponderscable = { } self.transpondersterrestrial = { }
self["entries"] = MenuList(list) self.clearMenu() self.createMenu(0) CiHandler.registerCIMessageHandler(0, self.ciStateChanged) def clearMenu(self): self.list = [ ] def createMenu(self, slot):
for slot in range(4): state = eDVBCI_UI.getInstance().getState(slot) self.appendEntries(slot, state) CiHandler.registerCIMessageHandler(slot, self.ciStateChanged) menuList = MenuList(list) menuList.list = self.list menuList.l.setList(self.list) self["entries"] = menuList def appendEntries(self, slot, state): self.sta...
def __init__(self, session): Screen.__init__(self, session)
self.state[slot] = eDVBCI_UI.getInstance().getState(slot)
def createMenu(self, slot): self.list.append( (_("Reset"), 0, slot) ) self.list.append( (_("Init"), 1, slot) )
self["entries"].list = self.list self["entries"].l.setList(self.list)
def updateState(self, slot): state = eDVBCI_UI.getInstance().getState(slot) self.state[slot] = state slotidx=0 while self.list[slotidx][2] != slot: slotidx += 1 slotidx += 1 slotidx += 1 if state == 0: self.list[slotidx] = (_("no module found"), 2, slot) elif state == 1: self.list[slotidx] = (_("init module"), 2, sl...
def createMenu(self, slot): self.list.append( (_("Reset"), 0, slot) ) self.list.append( (_("Init"), 1, slot) )
self.clearMenu() self.createMenu(slot)
self.updateState(slot)
def ciStateChanged(self, slot): if self.dlg: self.dlg.ciStateChanged() else: state = eDVBCI_UI.getInstance().getState(slot) if self.state[slot] != state: #print "something happens" self.state[slot] = state self.clearMenu() self.createMenu(slot)
def isSeekable(self):
def getSeek(self):
def isSeekable(self): service = self.session.nav.getCurrentService() if service is None: return False if service.seek() is None: return False else: return True
if service.seek() is None:
seek = service.seek() if seek is None or not seek.isCurrentlySeekable(): return None return seek def isSeekable(self): if self.getSeek() is None:
def isSeekable(self): service = self.session.nav.getCurrentService() if service is None: return False if service.seek() is None: return False else: return True
else: return True
return True
def isSeekable(self): service = self.session.nav.getCurrentService() if service is None: return False if service.seek() is None: return False else: return True
if service.seek() is None:
if not self.isSeekable():
def setSeekState(self, state): service = self.session.nav.getCurrentService() if service is None: return False if service.seek() is None: if state not in [self.SEEK_STATE_PLAY, self.SEEK_STATE_PAUSE]: state = self.SEEK_STATE_PLAY pauseable = service.pause()
seekable = service.seek()
seekable = self.getSeek()
def doSeek(self, seektime): print "doseek", seektime service = self.session.nav.getCurrentService() if service is None: return seekable = service.seek() if seekable is None: return seekable.seekTo(90 * seektime)
service = self.session.nav.getCurrentService() if service is None: return seekable = service.seek() if seekable is None: return seekable.seekRelative(1, minutes * 60 * 90000)
seekable = self.getSeek() if seekable is not None: seekable.seekRelative(1, minutes * 60 * 90000)
def fwdSeekTo(self, minutes): print "Seek", minutes, "minutes forward" if minutes != 0: service = self.session.nav.getCurrentService() if service is None: return seekable = service.seek() if seekable is None: return seekable.seekRelative(1, minutes * 60 * 90000)
service = self.session.nav.getCurrentService() if service is None: return seekable = service.seek() if seekable is None: return seekable.seekRelative(0, 0)
self.doSeek(0) def seekRelative(self, diff): seekable = self.getSeek() if seekable is not None: seekable.seekRelative(0, diff)
def __evSOF(self): self.setSeekState(self.SEEK_STATE_PLAY) service = self.session.nav.getCurrentService() if service is None: return seekable = service.seek() if seekable is None: return seekable.seekRelative(0, 0)
})
}, prio=-1)
def __init__(self): self["TimeshiftActions"] = HelpableActionMap(self, "InfobarTimeshiftActions", { "timeshiftStart": (self.startTimeshift, "start timeshift"), # the "yellow key" "timeshiftStop": (self.stopTimeshift, "stop timeshift") # currently undefined :), probably 'TV' }, prio=1) self["TimeshiftActivateActio...
menu.append((_("copy to favourites"), csel.copyCurrentToBouquetList))
menu.append((_("copy to favourites"), self.copyCurrentToBouquetList))
def __init__(self, session, csel): Screen.__init__(self, session) self.csel = csel
menu.append((_("remove bouquet"), csel.removeBouquet))
menu.append((_("remove bouquet"), self.removeBouquet))
def __init__(self, session, csel): Screen.__init__(self, session) self.csel = csel
if ref != None and ref.valid() and ref.getPath() == "":
if ref.valid() and ref.getPath() == "":
def onShow(self): ref = self.session.nav.getCurrentlyPlayingServiceReference() if ref != None and ref.valid() and ref.getPath() == "": self.servicelist.setPlayableIgnoreService(ref) else: self.servicelist.setPlayableIgnoreService(eServiceReference())
hdd += ", %d,%d GB" % (cap/1024, cap%1024)
hdd += ", %d.%03d GB" % (cap/1024, cap%1024)
def HDDList(self): list = [ ] for hd in self.hdd: cap = hd.capacity() / 1000 * 512 / 1000 hdd = hd.model() + " (" if hd.index & 1: hdd += "slave" else: hdd += "master" if cap > 0: hdd += ", %d,%d GB" % (cap/1024, cap%1024) hdd += ")"
def addEntry(self, list, entry): if entry[0] == "TEXT": list.append( (entry[1], entry[2]) ) if entry[0] == "PIN": if entry[3] == 1: x = configElement_nonSave("", configSequence, [1234], configsequencearg.get("PINCODE", (entry[1], "-"))) else: x = configElement_nonSave("", configSequence, [1234], configsequencearg.ge...
def addEntry(self, list, entry): if entry[0] == "TEXT": #handle every item (text / pin only?) #list.append( (entry[1], entry[2]) ) list.append( (entry[1], entry[2]) ) if entry[0] == "PIN": if entry[3] == 1: # masked pins: x = configElement_nonSave("", configSequence, [1234], configsequencearg.get("PINCODE", (entry[1],...
self["entries"] = MenuList([ ])
self["entries"] = ConfigList([ ]) self.listtype = TYPE_CONFIG
def __init__(self, session, slotid, action): Screen.__init__(self, session) print "ciMMI with action" + str(action)
pass self.showWait()
eDVBCI_UI.getInstance().setInit(self.slotid)
def __init__(self, session, slotid, action): Screen.__init__(self, session) print "ciMMI with action" + str(action)
elif action == 3: self.showScreen()
elif self.tag == "LIST": print "answer LIST" eDVBCI_UI.getInstance().answerMenu(self.slotid, 0) self.showWait() elif self.tag == "ENQ": answer = str(self.pin[1].parent.value[0]) print "answer ENQ", answer eDVBCI_UI.getInstance().answerEnq(self.slotid, answer) self.showWait() def closeMmi(self): self.Timer.stop() self....
def __init__(self, session, slotid, action): Screen.__init__(self, session) print "ciMMI with action" + str(action)
print "move to position", (self.positioner_storage.value + 1) self.diseqccommand("moveTo", self.positioner_storage.value + 1)
print "move to position", int(self.positioner_storage.value) self.diseqccommand("moveTo", int(self.positioner_storage.value)
def yellowKey(self): entry = self.getCurrentConfigPath() if entry == "move": if self.isMoving: self.diseqccommand("stop") self.isMoving = False self.stopOnLock = False else: self.isMoving = True self.stopOnLock = True self.diseqccommand("moveEast", 0) self.updateColors("move") elif entry == "finemove": print "stepping ...
w.abort() bisect.insort(self.processed_timers, w)
w.state = TimerEntry.StateEnded
def doActivate(self, w): self.timer_list.remove(w) # when activating a timer which has already passed, # simply abort the timer. don't run trough all the stages. if w.shouldSkip(): w.abort() bisect.insort(self.processed_timers, w) else: # when active returns true, this means "accepted". # otherwise, the current state ...
if nimtype = nimmanager.getNimType(1) == nimmanager.nimType["DVB-T"]:
if nimmanager.getNimType(1) == nimmanager.nimType["DVB-T"]:
def __init__(self, session): Screen.__init__(self, session)
return path
if os.glob(path + "*").size() == 0: return path
def getRecordingFilename(basename): # filter out non-allowed characters non_allowed_characters = "/.\\" filename = "" for c in basename: if c in non_allowed_characters: c = "_" filename += c i = 0 while True: path = "/hdd/movies/" + filename if i > 0: path += str(i)
parm.code_rate_HP = [fAuto, f1_2, f2_3, f3_4, f5_6, f7_8, fAuto][fechigh] parm.code_rate_LP = [fAuto, f1_2, f2_3, f3_4, f5_6, f7_8, fAuto][feclow]
parm.code_rate_HP = [f1_2, f2_3, f3_4, f5_6, f7_8, fAuto][fechigh] parm.code_rate_LP = [f1_2, f2_3, f3_4, f5_6, f7_8, fAuto][feclow]
def buildTerTransponder(frequency, inversion=2, bandwidth = 3, fechigh = 6, feclow = 6, modulation = 2, transmission = 2, guard = 4, hierarchy = 4):
iPlayableService.evUpdatedEventInfo: self.ourEvent, iPlayableService.evEnd: self.stopEvent
iPlayableService.evUpdatedEventInfo: self.changed, iPlayableService.evEnd: self.changed
def __init__(self, navcore, now_or_next): Source.__init__(self) PerServiceBase.__init__(self, navcore, { iPlayableService.evUpdatedEventInfo: self.ourEvent, iPlayableService.evEnd: self.stopEvent }) self.event = None self.now_or_next = now_or_next
self.event = None
def __init__(self, navcore, now_or_next): Source.__init__(self) PerServiceBase.__init__(self, navcore, { iPlayableService.evUpdatedEventInfo: self.ourEvent, iPlayableService.evEnd: self.stopEvent }) self.event = None self.now_or_next = now_or_next
def ourEvent(self):
def getEvent(self):
def ourEvent(self): service = self.navcore.getCurrentService() info = service and service.info() self.event = info and info.getEvent(self.now_or_next) self.changed()
self.event = info and info.getEvent(self.now_or_next) self.changed()
return info and info.getEvent(self.now_or_next)
def ourEvent(self): service = self.navcore.getCurrentService() info = service and service.info() self.event = info and info.getEvent(self.now_or_next) self.changed()
elif currentConfigSelectionElement(config.tuning.type) == "predefined_transponder":
elif config.tuning.transponder and self.currentConfigSelectionElement(config.tuning.type) == "predefined_transponder":
def createSetup(self): self.typeOfTuningEntry = None self.satEntry = None
satpos = config.tuning.sat.vals[config.tuning.sat.value][1] if currentConfigSelectionElement(config.tuning.type) == "manual_transponder": returnvalue = (config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarization.value, config.scan.sat.fec.value, config.scan.sat.inversion.value...
val = config.tuning.sat.value if val > 0 and len(config.tuning.sat.vals) > val: satpos = config.tuning.sat.vals[config.tuning.sat.value][1] elif len(config.tuning.sat.vals) > 0: satpos = config.tuning.sat.vals[0][1] else: satpos = None if satpos: if currentConfigSelectionElement(config.tuning.type) == "manual_transpond...
def retune(self, configElement): returnvalue = (0, 0, 0, 0, 0, 0, 0) satpos = config.tuning.sat.vals[config.tuning.sat.value][1] if currentConfigSelectionElement(config.tuning.type) == "manual_transponder": returnvalue = (config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarizat...
config.tuning.transponder = None
def createConfig(self, foo): config.tuning = ConfigSubsection() config.tuning.type = configElement_nonSave("config.tuning.type", configSelection, 0, (("manual_transponder", _("Manual transponder")), ("predefined_transponder", _("Predefined satellite")))) config.tuning.sat = configElement_nonSave("config.tuning.sat", c...
returnvalue = (0, 0, 0, 0, 0, 0, 0) satpos = config.tuning.sat.vals[config.tuning.sat.value][1] if currentConfigSelectionElement(config.tuning.type) == "manual_transponder": returnvalue = (config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarization.value, config.scan.sat.fec.va...
self.retune(config.tuning.type)
def keyGo(self): returnvalue = (0, 0, 0, 0, 0, 0, 0) satpos = config.tuning.sat.vals[config.tuning.sat.value][1] if currentConfigSelectionElement(config.tuning.type) == "manual_transponder": returnvalue = (config.scan.sat.frequency.value[0], config.scan.sat.symbolrate.value[0], config.scan.sat.polarization.value, confi...
try: self.configInstance.run() except: print "Failed to run configInstance"
self.configInstance.run()
def ok(self): print "OK" currStep = self.currStep if self.showConfig: if (self.wizard[currStep]["config"]["screen"] != None): try: # don't die, if no run() is available self.configInstance.run() except: print "Failed to run configInstance" if self.showList: if (len(self.wizard[currStep]["list"]) > 0): nextStep = self....
pass
self.__dict__.clear()
def destroy(self): pass
if self.tag == "ENQ":
if self.tag and self.tag == "ENQ":
def updateList(self, list): List = self["entries"] try: List.instance.moveSelectionTo(0) except: List.l.setList(list) return
self.addLanguage(_("Netherlands"), "nl")
self.addLanguage(_("Dutch"), "nl")
def __init__(self): gettext.install('enigma2', resolveFilename(SCOPE_LANGUAGE, ""), unicode=0, codeset="utf-8") self.activeLanguage = 0 self.lang = [] # FIXME make list dynamically self.addLanguage(_("English"), "en") self.addLanguage(_("German"), "de") self.addLanguage(_("Arabic"), "ar") self.addLanguage(_("Netherland...
self.close()
def addCurrentServiceToBouquet(self, dest): mutableList = self.getMutableList(dest) if not mutableList is None: if not mutableList.addService(self.servicelist.getCurrent()): self.bouquetNumOffsetCache = { } mutableList.flushChanges() self.close()
self.addCurrentServiceToBouquet(bouquet[0][1])
self.addCurrentServiceToBouquet(bouquets[0][1])
def addServiceToBouquetSelected(self): bouquets = self.csel.getBouquetList() if bouquets is None: cnt = 0 else: cnt = len(bouquets) if cnt > 1: # show bouquet list self.session.open(BouquetSelector, bouquets, self.addCurrentServiceToBouquet) elif cnt == 1: # add to only one existing bouquet self.addCurrentServiceToBouq...
self.timeinput_date = ConfigDateTime(default = nowtime, formatstring = (_("%d.%B %Y"), 86400))
self.timeinput_date = ConfigDateTime(default = nowtime, formatstring = _("%d.%B %Y"), increment = 86400)
def createConfig(self): nowtime = time.time() self.timeinput_date = ConfigDateTime(default = nowtime, formatstring = (_("%d.%B %Y"), 86400)) self.timeinput_time = ConfigClock(default = nowtime)
assert False, "fixme"
def createConfig(self): nowtime = time.time() self.timeinput_date = ConfigDateTime(default = nowtime, formatstring = (_("%d.%B %Y"), 86400)) self.timeinput_time = ConfigClock(default = nowtime)