def __init__(self, session, initDir, plugin_path=None): Screen.__init__(self, session) if not os.path.isdir(initDir): initDir = "/media/hdd/movie/" self["folderlist"] = FileList(initDir, inhibitMounts=False, inhibitDirs=False, showMountpoints=False, showFiles=False) self["media"] = Label() self["actions"] = ActionMap( [ "WizardActions", "DirectionActions", "ColorActions", "EPGSelectActions" ], { "back": self.cancel, "left": self.left, "right": self.right, "up": self.up, "down": self.down, "ok": self.ok, "green": self.green, "red": self.cancel }, -1) self.title = _("Choose Download folder") try: self["title"] = StaticText(self.title) except: print('self["title"] was not found in skin') self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Ok"))
def __init__(self, session, args = 0): Screen.__init__(self, session) self.skinName = ["Setup"] config.easysetup = ConfigSubsection() config.easysetup.restart = ConfigBoolean(default = False) config.easysetup.backup = ConfigYesNo(default=True) config.easysetup.hddsetup = ConfigYesNo(default=False) config.easysetup.records = ConfigYesNo(default=False) config.easysetup.timeshift = ConfigYesNo(default=False) config.easysetup.Keymap = ConfigYesNo(default=False) config.easysetup.Hotkey = ConfigYesNo(default=False) config.easysetup.channellist = ConfigYesNo(default=False) config.easysetup.m3u = ConfigYesNo(default=False) config.easysetup.menusort = ConfigYesNo(default=False) config.easysetup.hdmicec = ConfigYesNo(default=False) config.easysetup.password = ConfigYesNo(default=False) config.easysetup.displaysetup = ConfigYesNo(default=False) config.wizardsetup.UserInterfacePositioner = ConfigYesNo(default = False) config.wizardsetup.OpenWebifConfig = ConfigYesNo(default = False) config.wizardsetup.OpenNFRaddonsWizardSetup = ConfigYesNo(default = False) config.wizardsetup.poweroffsetup = ConfigYesNo(default = False) config.wizardsetup.ipkinstall = ConfigYesNo(default = False) self.backup = '0' self.runed = '0' self['spaceused'] = ProgressBar() self["status"] = ScrollLabel() self.onShown.append(self.setWindowTitle) self["description"] = Label(_("")) list = [] list.append(getConfigListEntry(_('Enable Fullbackup after Easy-Setup?'), config.easysetup.backup, _("Default is enable and Fullbackup will start after all Setups are ready."))) list.append(getConfigListEntry(_('Enable HDD/USB/SD Mounts Setup?'), config.easysetup.hddsetup, _("Choose your Device mounts (USB, HDD, others...)."))) list.append(getConfigListEntry(_('Enable Records Setup?'), config.easysetup.records, _("Choose your recording config."))) list.append(getConfigListEntry(_('Enable Timeshift Setup?'), config.easysetup.timeshift, _("Choose your timeshift config."))) list.append(getConfigListEntry(_('Enable Keymap Setup?'), config.easysetup.Keymap, _("Choose your keymap."))) list.append(getConfigListEntry(_('Enable Hotkey Setup?'), config.easysetup.Hotkey, _("Choose your remote buttons."))) list.append(getConfigListEntry(_('Enable Channellist Setup?'), config.easysetup.channellist, _("Choose your Channel selection config."))) list.append(getConfigListEntry(_('Enable M3U Convert to Channellist Setup?'), config.easysetup.m3u, _("Install your IPTV-m3u-files into channellist.\nFirst you must coppy a M3U-List to /etc/enigma2"))) if os.path.isfile("/usr/lib/enigma2/python/Plugins/Extensions/MenuSort/plugin.pyo") is True: list.append(getConfigListEntry(_('Enable Menusort Setup?'), config.easysetup.menusort, _("Choose your Mainmenu sorts."))) if os.path.isfile("/usr/lib/enigma2/python/Plugins/SystemPlugins/HdmiCEC/plugin.pyo") is True: list.append(getConfigListEntry(_('Enable HDMI-CEC Setup?'), config.easysetup.hdmicec, _("Choose your HDMI-CEC config."))) list.append(getConfigListEntry(_('Enable Password change?'), config.easysetup.password, _("Change the rootpassword for login in ftp, telnet and webif."))) list.append(getConfigListEntry(_('Enable Display Setup?'), config.easysetup.displaysetup, _("Choose your Display config."))) list.append(getConfigListEntry(_('Enable Position Setup?'), config.wizardsetup.UserInterfacePositioner, _("Choose your OSD Position in TV"))) list.append(getConfigListEntry(_('Enable OpenWebif Setup?'), config.wizardsetup.OpenWebifConfig, _("Choose your Openwebif config."))) list.append(getConfigListEntry(_('Enable OpenNFR-Addons Setup?'), config.wizardsetup.OpenNFRaddonsWizardSetup, _("Install OpenNFR Plugins."))) list.append(getConfigListEntry(_('Enable Install local extension Setup?'), config.wizardsetup.ipkinstall, _("Scan for local extensions and install them."))) list.append(getConfigListEntry(_('Enable Power Off Menu Setup?'), config.wizardsetup.poweroffsetup, _("Choose your Powerbutton Funktion on Remotecontrol."))) self["key_red"] = Label(_("Exit")) self["key_green"] = Label(_("Start Easy-Setup")) self['label1'] = Label(_('')) self['label2'] = Label(_('% Flash Used....')) self['label3'] = Label(_('')) ConfigListScreen.__init__(self, list) self['actions'] = ActionMap(['OkCancelActions', 'ColorActions'], {'red': self.dontSaveAndExit, 'green' : self.run1, 'cancel': self.dontSaveAndExit}, -1)
def __init__(self, session, args=0): Screen.__init__(self, session) self.skinName = ["Setup"] list = [] list.append( getConfigListEntry(_('Enable HBBTV ?'), config.opennfrwizard.enablehbbtv)) list.append( getConfigListEntry(_('Enable 3G / 4G Modems support ?'), config.opennfrwizard.enable3gmodems)) list.append( getConfigListEntry(_('Enable Firmware Update Plugin ?'), config.opennfrwizard.firmwaremicom)) #list.append(getConfigListEntry(_('Enable DLNA Server ?'), config.opennfrwizard.enableDLNAServer)) #list.append(getConfigListEntry(_('Enable DLNA Browser ?'), config.opennfrwizard.enableDLNABrowser)) list.append( getConfigListEntry(_('Enable WiFi drivers ?'), config.opennfrwizard.enableWifiDrivers)) #list.append(getConfigListEntry(_('Enable DVB-T/S/C USB drivers ?'), config.opennfrwizard.enableDvbtDrivers)) self["key_red"] = Label(_("Save")) self["key_green"] = Label(_("Exit")) ConfigListScreen.__init__(self, list) self['actions'] = ActionMap( ['OkCancelActions', 'ColorActions'], { 'red': self.run, 'green': self.dontSaveAndExit, 'cancel': self.dontSaveAndExit }, -1)
def __init__(self, session, args=0): Screen.__init__(self, session) self.title = _('Change Root Password') try: self['title'] = StaticText(self.title) except: print('self["title"] was not found in skin') self.user = '******' self.output_line = '' self.list = [] self['passwd'] = ConfigList(self.list) self['key_red'] = StaticText(_('Close')) self['key_green'] = StaticText(_('Set Password')) self['key_yellow'] = StaticText(_('new Random')) self['key_blue'] = StaticText(_('virt. Keyboard')) self['actions'] = ActionMap( ['OkCancelActions', 'ColorActions'], { 'red': self.close, 'green': self.SetPasswd, 'yellow': self.newRandom, 'blue': self.bluePressed, 'cancel': self.close }, -1) self.buildList(self.GeneratePassword()) self.onShown.append(self.setWindowTitle)
def __init__(self, session): Screen.__init__(self, session) self.session = session self.skinName = ["SetupInfo", "Setup"] Screen.setTitle(self, _("Keymap Selection") + "...") self.setup_title = _("Keymap Selection") + "..." self["HelpWindow"] = Pixmap() self["HelpWindow"].hide() self["status"] = StaticText() self['footnote'] = Label("") self["description"] = Label("") self["labelInfo"] = Label( _("Copy your keymap to\n/usr/share/enigma2/keymap.usr")) usrkey = eEnv.resolve("${datadir}/enigma2/keymap.usr") ntrkey = eEnv.resolve("${datadir}/enigma2/keymap.ntr") u80key = eEnv.resolve("${datadir}/enigma2/keymap.u80") self.actkeymap = self.getKeymap(config.usage.keymap.value) keySel = [('keymap.xml', _("Default (keymap.xml)"))] if os.path.isfile(usrkey): keySel.append(('keymap.usr', _("User (keymap.usr)"))) if os.path.isfile(ntrkey): keySel.append(('keymap.ntr', _("Neut (keymap.ntr)"))) if os.path.isfile(u80key): keySel.append(('keymap.u80', _("UP80 (keymap.u80)"))) if self.actkeymap == usrkey and not os.path.isfile(usrkey): setDefaultKeymap() if self.actkeymap == ntrkey and not os.path.isfile(ntrkey): setDefaultKeymap() if self.actkeymap == u80key and not os.path.isfile(u80key): setDefaultKeymap() self.keyshow = ConfigSelection(keySel) self.keyshow.setValue(self.actkeymap) self.onChangedEntry = [] self.list = [] ConfigListScreen.__init__(self, self.list, session=self.session, on_change=self.changedEntry) self.createSetup() self["actions"] = ActionMap( ["SetupActions", 'ColorActions'], { "ok": self.keySave, "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "menu": self.keyCancel, }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) if not self.selectionChanged in self["config"].onSelectionChanged: self["config"].onSelectionChanged.append(self.selectionChanged) self.selectionChanged()
def __init__(self, session): Screen.__init__(self, session) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("OK")) self.list = [] self.list.append(getConfigListEntry(_("Search Site:"), config.EMC.imdb.search)) self.list.append(getConfigListEntry(_("Single Search:"), config.EMC.imdb.singlesearch)) ConfigListScreen.__init__(self, self.list, session) self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.keySave, "cancel": self.keyClose, "ok": self.keySave, }, -2)
def __init__(self, session, chartlist, index, filename, plugin_path): Screen.__init__(self, session) self.session = session self.plugin_path = plugin_path self.skin_path = plugin_path InfoBarNotifications.__init__(self) InfoBarBase.__init__(self) InfoBarShowHide.__init__(self) self["actions"] = ActionMap( [ "WizardActions", "MoviePlayerActions", "EPGSelectActions", "MediaPlayerSeekActions", "ColorActions", "InfobarShowHideActions", "InfobarActions" ], { "leavePlayer": self.leavePlayer, "back": self.leavePlayer, "left": self.previous, "right": self.next, "info": self.lyrics, "up": self.playlist, "down": self.random_now, "input_date_time": self.playconfig, "menu": self.playconfig, }, -1) self.allowPiP = False InfoBarSeek.__init__(self, actionmap="MediaPlayerSeekActions") self.returning = False self.skinName = "MoviePlayer" self.lastservice = session.nav.getCurrentlyPlayingServiceReference() self.filename = filename self.chartList = chartlist self.index = index print self.index self.repeat = config.plugins.chartsplayerconfig.repeat.value self.random = config.plugins.chartsplayerconfig.random.value self.GK = ('WXpnME1EZGhNRGhpTTJNM01XVmhOREU0WldNNVpHTTJOakpt' 'TW1FMU5tVTBNR05pWkRaa05XRXhNVFJoWVRVd1ptSXhaVEV3' 'TnpsbA0KTVRkbU1tSTRNdz09') self.onLayoutFinish.append(self.play)
def __init__(self, session, currDir): Screen.__init__(self, session) self.skinName = ["EMCFileBrowser"] HelpableScreen.__init__(self) self["cancel"] = Button(_("Cancel")) self["open"] = Button(_("Open")) self.filelist = FileList(currDir, showFiles=True, matchingPattern=".(e2pls|m3u)") self["filelist"] = self.filelist self.lastDir = currDir self["FilelistActions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.use, "red": self.exit, "ok": self.ok, "cancel": self.exit }) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, service): Screen.__init__(self, session) self.session = session self.service = service BackgroundCoverScanner(session) bg_func = BackgroundCoverScanner.instance bg_func.startTimer() self["actions"] = ActionMap( [ "OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", "NumberActions", "MenuActions", "EPGSelectActions" ], { "cancel": self.cancel, "green": self.getFileList, "blue": self.setScanPath, "left": self.keyLeft, "right": self.keyRight, "up": self.keyUp, "down": self.keyDown, "ok": self.keyOk }, -1) #self['title'] self.title = "%s v%s" % (pname, pversion) self['info'] = Label("") self['path'] = Label("Scan Path: %s" % config.movielist.cover.scanpath.value) self['found'] = Label("Download:") self['notfound'] = Label("Not Found:") self['error'] = Label("Download Error:") self['cover'] = Pixmap() self['key_red'] = Label("Exit") self['key_green'] = Label("Search Cover(s)") self['key_yellow'] = Label("") self['key_blue'] = Label("Set Scan Path") self['list'] = fmlcMenuList() self.fileScanner = BackgroundCoverScanner.instance self.fileScanner.setCallbacks(self.msgCallback, self.foundCallback, self.notFoundCallback, self.errorCallback, self.listCallback, self.msgDone) self.scanning = False self.first = False self.onLayoutFinish.append(self._onLayoutFinish)
def __init__(self, session, args = 0): Screen.__init__(self, session) self.skinName = ["Setup"] self['spaceused'] = ProgressBar() self["status"] = ScrollLabel() self.onShown.append(self.setWindowTitle) list = [] list.append(getConfigListEntry(_('Enable OpenNfr Image-Update-Check?'), config.opennfrupdate.enablecheckupdate)) self["key_red"] = Label(_("Exit")) self["key_green"] = Label(_("Save")) ConfigListScreen.__init__(self, list) self['actions'] = ActionMap(['OkCancelActions', 'ColorActions'], {'red': self.dontSaveAndExit, 'green' : self.run, 'cancel': self.dontSaveAndExit}, -1)
def __init__(self, session): Screen.__init__(self, session) self.list = [] self.list.append(getConfigListEntry(_("Default Playlist path"), config.EMC.playlist.default_playlist_path)) self.list.append(getConfigListEntry(_("Default Playlist name"), config.EMC.playlist.default_playlist_name)) self.list.append(getConfigListEntry(_("Always save current Playlist"), config.EMC.playlist.save_default_list)) ConfigListScreenExt.__init__(self, self.list, session) self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "ok": self.ok, "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, }, -2) self["cancel"] = Button(_("Cancel")) self["save"] = Button(_("Save")) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session): Screen.__init__(self, session) self.session = session self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", "NumberActions", "MenuActions", "EPGSelectActions"], { "cancel": self.cancel, "red": self.cancel, "green" : self.save }, -1) self['info'] = Label(_("Settings:")) self['key_red'] = Label(_("Cancel")) self['key_green'] = Label(_("Ok")) self['key_yellow'] = Label("") self['key_blue'] = Label("") self.list = [] self.createConfigList() ConfigListScreen.__init__(self, self.list) self.fileScanner = BackgroundCoverScanner.instance
def __init__(self, session): Screen.__init__(self, session) self.session = session self.list = [] self.list.append( getConfigListEntry("Repeat", config.plugins.chartsplayerconfig.repeat)) self.list.append( getConfigListEntry("Random", config.plugins.chartsplayerconfig.random)) self.list.append( getConfigListEntry("Start", config.plugins.chartsplayerconfig.startwith)) ConfigListScreen.__init__(self, self.list) self["setupActions"] = ActionMap(["SetupActions"], { "ok": self.save, "cancel": self.cancel, }, -2)
def __init__(self, session): if sz_w.width() > 1280: path = skin_path + 'defaultListScreen_new.xml' else: path = skin_path + 'defaultListScreen.xml' with open(path, 'r') as f: self.skin = f.read() f.close() self.session = session Screen.__init__(self, session) self['actions'] = ActionMap( [ 'OkCancelActions', 'ColorActions', 'DirectionActions', 'MovieSelectionActions' ], { 'up': self.up, 'down': self.down, 'left': self.left, 'right': self.right, 'ok': self.ok, 'green': self.message2, 'cancel': self.exit, 'red': self.exit }, -1) self['menulist'] = m2list([]) self['red'] = Label(_('Exit')) self['green'] = Label(_('Export')) self['title'] = Label('free') self['name'] = Label('') self['text'] = Label('') # self['poster'] = Pixmap() self.picload = ePicLoad() self.picfile = '' self.currentList = 'menulist' self.menulist = [] self.loading_ok = False self.count = 0 self.loading = 0 self.oldService = self.session.nav.getCurrentlyPlayingServiceReference( ) self.onLayoutFinish.append(self.downmasterpage)
def __init__(self, session, args=0): Screen.__init__(self, session) self.skinName = ["Setup"] self['spaceused'] = ProgressBar() self["status"] = ScrollLabel() self.onShown.append(self.setWindowTitle) list = [] list.append( getConfigListEntry(_('Enable OpenNfr MediaCenter ?'), config.opennfrwizard.enablemediacenter)) list.append( getConfigListEntry( _('Enable OpenNfr Skalli-FullHD-Mod Skin mod by Blasser ?'), config.opennfrwizard.enableskalliskin)) list.append( getConfigListEntry(_('Enable OpenNfr MainMenu2 ?'), config.opennfrwizard.enablemainmenu2)) list.append( getConfigListEntry(_('Enable OpenNfr Webinterface ?'), config.opennfrwizard.enablewebinterface)) self["key_red"] = Label(_("Exit")) self["key_green"] = Label(_("Save")) self['label1'] = Label( _('IF you install this Plugins with not enough Flashmemory it comes to trouble\nThe image could be destroyed!\n\nWebInterface 3.6MB\nBMediacenter 6.4MB\nSkalli 4.5MB\nMainmenu2 3.6MB' )) self['label2'] = Label(_('% Flash Used....')) self['label3'] = Label( _('Warning!!! If you select No, Existing Installations will be deleted!!' )) ConfigListScreen.__init__(self, list) self['actions'] = ActionMap( ['OkCancelActions', 'ColorActions'], { 'red': self.dontSaveAndExit, 'green': self.run, 'cancel': self.dontSaveAndExit }, -1)
def __init__(self, session, name, url): Screen.__init__(self, session) self.skinName = 'MoviePlayer' title = 'Play' self['list'] = MenuList([]) InfoBarMenu.__init__(self) InfoBarNotifications.__init__(self) InfoBarBase.__init__(self) InfoBarShowHide.__init__(self) self['actions'] = ActionMap([ 'WizardActions', 'MoviePlayerActions', 'EPGSelectActions', 'MediaPlayerSeekActions', 'ColorActions', 'InfobarShowHideActions', 'InfobarActions' ], { 'leavePlayer': self.cancel, 'back': self.cancel }, -1) self.allowPiP = False InfoBarSeek.__init__(self, actionmap='MediaPlayerSeekActions') url = url.replace(':', '%3a') self.url = url self.name = name self.srefOld = self.session.nav.getCurrentlyPlayingServiceReference() self.onLayoutFinish.append(self.openTest)
def __init__(self, session, title): Screen.__init__(self, session) self.session = session self.title = title self["list"] = charts([]) self["info"] = Label("") self.backinfo = "main" self.key_mode = "list" self["lyric_info"] = ScrollLabel() self["lyric_info"].hide() self["actions"] = ActionMap( [ "WizardActions", "MoviePlayerActions", "EPGSelectActions", "MediaPlayerSeekActions", "ColorActions" ], { "cancel": self.exit, "back": self.exit, "ok": self.ok, "up": self.up, "down": self.down, }, -1) self.onLayoutFinish.append(self.search_title)