def __init__(self, session, categories=[]): BaseArchivCZSKScreen.__init__(self, session) ConfigListScreen.__init__(self, [], session=session, on_change=self.changedEntry) self.onChangedEntry = [] self.categories = categories self.selected_category = 0 self.config_list_entries = [] self.category_widgets = [] self.category_widgets_y = 100 self.initializeCategories() self.initializeSkin() self["key_yellow"] = Label(_("Changelog")) self["key_green"] = Label(_("Save")) self["key_red"] = Label(_("Cancel")) self["key_blue"] = Label(_("Next")) self["actions"] = ActionMap( ["SetupActions", "ColorActions"], { "cancel": self.keyCancel, "green": self.keySave, "ok": self.keyOk, "red": self.keyCancel, "blue": self.nextCategory, "yellow": self.changelog }, -2)
def __init__(self, session, name, img, items=None, globalItems=None): BaseArchivCZSKScreen.__init__(self, session) self.ctxItems = items or [] self.globalCtxItems = globalItems or [] self.disabledItemsIdx = [] name = isinstance(name, unicode) and name.encode('utf-8') or name img = img and img.endswith(('.jpg', '.png')) and img img = img and LoadPixmap(cached=True, path=img) self.img = img or None self.itemListDisabled = not (items and len(items) > 0) self.globalListDisabled = not (globalItems and len(globalItems) > 0) self.useSeparator = not self.globalListDisabled self["item_pixmap"] = Pixmap() self["item_label"] = Label(name) self['list'] = ContextMenuList() self["actions"] = ActionMap(["archivCZSKActions"], {"ok": self.ok, "cancel": self.cancel, "up": self.up, "down": self.down, }, -2) self.onLayoutFinish.append(self.updateMenuList) self.onLayoutFinish.append(self.updateSelection) self.onLayoutFinish.append(self.checkList) self.onShown.append(self.__onShown)
def __init__(self, session, categories=[]): BaseArchivCZSKScreen.__init__(self, session) ConfigListScreen.__init__(self, [], session=session, on_change=self.changedEntry) self.onChangedEntry = [ ] self.categories = categories self.selected_category = 0 self.config_list_entries = [] self.category_widgets = [] self.category_widgets_y = 100 self.initializeCategories() self.initializeSkin() self["key_yellow"] = Label(_("Changelog")) self["key_green"] = Label(_("Save")) self["key_red"] = Label(_("Cancel")) self["key_blue"] = Label(_("Next")) self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "cancel": self.keyCancel, "green": self.keySave, "ok": self.keyOk, "red": self.keyCancel, "blue": self.nextCategory, "yellow": self.changelog }, -2)
def __init__(self, session, name, img, items=None, globalItems=None): BaseArchivCZSKScreen.__init__(self, session) self.ctxItems = items or [] self.globalCtxItems = globalItems or [] self.disabledItemsIdx = [] name = isinstance(name, unicode) and name.encode('utf-8') or name img = img and img.endswith(('.jpg', '.png')) and img img = img and LoadPixmap(cached=True, path=img) self.img = img or None self.itemListDisabled = not (items and len(items) > 0) self.globalListDisabled = not (globalItems and len(globalItems) > 0) self.useSeparator = not self.globalListDisabled self["item_pixmap"] = Pixmap() self["item_label"] = Label(name) self['list'] = ContextMenuList() self["actions"] = ActionMap( ["archivCZSKActions"], { "ok": self.ok, "cancel": self.cancel, "up": self.up, "down": self.down, }, -2) self.onLayoutFinish.append(self.updateMenuList) self.onLayoutFinish.append(self.updateSelection) self.onLayoutFinish.append(self.checkList) self.onShown.append(self.__onShown)
def __init__(self, session, download): BaseArchivCZSKScreen.__init__(self, session) self.title = _("Download progress") self["filename"] = Label("") self["size_label"] = Label(_("Size:")) self["size"] = Label("") self["path_label"] = Label(_("Path:")) self["path"] = Label("") self["start_label"] = Label(_("Start time:")) self["start"] = Label("") self["finish_label"] = Label(_("Finish time:")) self["finish"] = Label("") self["state_label"] = Label(_("State:")) self["state"] = MultiColorLabel("") self["speed_label"] = Label(_("Speed:")) self["speed"] = Label("0 KB/s") self["status"] = Label("") self["actions"] = ActionMap(["WizardActions", "DirectionActions"], { "ok": self.cancel, "back": self.cancel, }, -1) self._download = download self._download.onOutputCB.append(self.outputCallback) self._download.onFinishCB.append(self.updateState) self._download.onFinishCB.append(self.updateFinishTime) self._download.onFinishCB.append(self.stopTimer) self.timer = eTimer() self.timer_running = False self.timer_interval = 3000 self.timer.callback.append(self.updateStatus) self.onShown.append(self.updateStaticInfo) self.onShown.append(self.updateState) self.onShown.append(self.updateFinishTime) self.onShown.append(self.startTimer) self.onLayoutFinish.append(self.startRun) # dont start before gui is finished self.onLayoutFinish.append(self.updateGUI) self.onClose.append(self.__onClose)
def __init__(self, session, download): BaseArchivCZSKScreen.__init__(self, session) self.title = _("Download progress") self["filename"] = Label("") self["size_label"] = Label(_("Size:")) self["size"] = Label("") self["path_label"] = Label(_("Path:")) self["path"] = Label("") self["start_label"] = Label(_("Start time:")) self["start"] = Label("") self["finish_label"] = Label(_("Finish time:")) self["finish"] = Label("") self["state_label"] = Label(_("State:")) self["state"] = MultiColorLabel("") self["speed_label"] = Label(_("Speed:")) self["speed"] = Label("0 KB/s") self["status"] = Label("") self["actions"] = ActionMap(["WizardActions", "DirectionActions"], { "ok": self.cancel, "back": self.cancel, }, -1) self._download = download self._download.onOutputCB.append(self.outputCallback) self._download.onFinishCB.append(self.updateState) self._download.onFinishCB.append(self.updateFinishTime) self._download.onFinishCB.append(self.stopTimer) self.timer = eTimer() self.timer_conn = eConnectCallback(self.timer.timeout, self.updateStatus) self.timer_interval = 3000 self.onShown.append(self.updateStaticInfo) self.onShown.append(self.updateState) self.onShown.append(self.updateFinishTime) self.onShown.append(self.startTimer) self.onLayoutFinish.append(self.startRun) # dont start before gui is finished self.onLayoutFinish.append(self.updateGUI) self.onClose.append(self.__onClose)
def __init__(self, session, title, text=None): BaseArchivCZSKScreen.__init__(self, session) self.changelog = text self.title = title if self.changelog is not None: self["changelog"] = ScrollLabel(self.changelog.encode('utf-8', 'ignore')) else: self["changelog"] = ScrollLabel('') self["actions"] = NumberActionMap(["archivCZSKActions"], { "cancel": self.close, "up": self.pageUp, "down": self.pageDown, }, -2) self.title = self.title.encode('utf-8', 'ignore') + ' changelog'
def __init__(self, session, title, text=None): BaseArchivCZSKScreen.__init__(self, session) self.changelog = text self.title = title if self.changelog is not None: self["changelog"] = ScrollLabel( self.changelog.encode('utf-8', 'ignore')) else: self["changelog"] = ScrollLabel('') self["actions"] = NumberActionMap(["archivCZSKActions"], { "cancel": self.close, "up": self.pageUp, "down": self.pageDown, }, -2) self.title = self.title.encode('utf-8', 'ignore') + ' changelog'
def __init__(self, session): BaseArchivCZSKScreen.__init__(self, session) self.__settings = config.plugins.archivCZSK.videoPlayer self.selectedInstallType = self.GST_INSTALL self.restartNeeded = False if ARCH == 'mipsel': self["key_red"] = Label(_("Install GStreamer plugins")) self["key_green"] = Label(_("Install RTMP plugins")) self["key_yellow"] = Label(_("Re-Install GStreamer plugins")) self["key_blue"] = Label(_("Refresh")) else: self["key_red"] = Label("") self["key_green"] = Label("") self["key_yellow"] = Label("") self["key_blue"] = Label("") self["detected player"] = Label(_("Detected player:")) self["detected player_val"] = Label("") self["protocol"] = Label(_("Supported protocols:")) self["protocol_list"] = PanelList([], 24) self["container"] = Label(_("Supported containers:")) self["container_list"] = PanelList([], 24) self["info_scrolllabel"] = ScrollLabel() self["actions"] = ActionMap( ["archivCZSKActions"], { "up": self.pageUp, "down": self.pageDown, "right": self.pageDown, "left": self.pageUp, "cancel": self.cancel, "blue": self.updateGUI, "yellow": self.askReinstallGstPlugins, "red": self.askInstallGstPlugins, "green": self.askInstallRtmpPlugin, }, -2) self.onShown.append(self.setWindowTitle) self.onLayoutFinish.append(self.disableSelection) self.onLayoutFinish.append(self.setPlayer) self.onLayoutFinish.append(self.setInfo) self.onLayoutFinish.append(self.updateGUI)
def __init__(self, session, it): BaseArchivCZSKScreen.__init__(self, session) self.image_link = None self.it = it self.image_dest = None if it.image is not None: self.image_link = it.image.encode('utf-8', 'ignore') self.image_dest = os.path.join('/tmp/', self.image_link.split('/')[-1]) self.plot = '' self.genre = '' self.rating = '' self.year = '' for key, value in it.info.iteritems(): if key == 'Plot' or key == 'plot': self.plot = value.encode('utf-8', 'ignore') if key == 'Genre' or key == 'genre': self.genre = value.encode('utf-8', 'ignore') if key == 'Rating' or key == 'rating': self.rating = value.encode('utf-8', 'ignore') if key == 'Year' or key == 'year': self.year = value.encode('utf-8', 'ignore') self["img"] = Pixmap() self["genre"] = Label(_("Genre: ") + self.genre) self["year"] = Label(_("Year: ") + self.year) self["rating"] = Label(_("Rating: ") + self.rating) self["plot"] = ScrollLabel(self.plot) self["actions"] = NumberActionMap(["archivCZSKActions"], { "cancel": self.close, "up": self.pageUp, "down": self.pageDown, }, -2) self.title = self.it.name.encode('utf-8', 'ignore') self.Scale = AVSwitch().getFramebufferScale() self.picLoad = ePicLoad() self.picLoad_conn = eConnectCallback(self.picLoad.PictureData, self.decodePicture) self.onLayoutFinish.append(self.showPicture) self.onClose.append(self.__onClose)
def __init__(self, session): BaseArchivCZSKScreen.__init__(self, session) self.__settings = config.plugins.archivCZSK.videoPlayer self.selectedInstallType = self.GST_INSTALL self.restartNeeded = False if ARCH == 'mipsel': self["key_red"] = Label(_("Install GStreamer plugins")) self["key_green"] = Label(_("Install RTMP plugins")) self["key_yellow"] = Label(_("Re-Install GStreamer plugins")) self["key_blue"] = Label(_("Refresh")) else: self["key_red"] = Label("") self["key_green"] = Label("") self["key_yellow"] = Label("") self["key_blue"] = Label("") self["detected player"] = Label(_("Detected player:")) self["detected player_val"] = Label("") self["protocol"] = Label(_("Supported protocols:")) self["protocol_list"] = PanelList([], 24) self["container"] = Label(_("Supported containers:")) self["container_list"] = PanelList([], 24) self["info_scrolllabel"] = ScrollLabel() self["actions"] = ActionMap(["archivCZSKActions"], { "up": self.pageUp, "down": self.pageDown, "right": self.pageDown, "left": self.pageUp, "cancel":self.cancel, "blue": self.updateGUI, "yellow": self.askReinstallGstPlugins, "red": self.askInstallGstPlugins, "green": self.askInstallRtmpPlugin, }, -2) self.onShown.append(self.setWindowTitle) self.onLayoutFinish.append(self.disableSelection) self.onLayoutFinish.append(self.setPlayer) self.onLayoutFinish.append(self.setInfo) self.onLayoutFinish.append(self.updateGUI)
def __init__(self, session, title, text=None): BaseArchivCZSKScreen.__init__(self, session) self.changelog = "" try: from Plugins.Extensions.archivCZSK.engine.tools.util import toString if text is not None: self.changelog = toString(text) self.title = toString(title) + ' changelog' except: self.changelog = "failed" log.logError("Convert log file text failed.\n%s" % traceback.format_exc()) pass self["changelog"] = ScrollLabel(self.changelog) self["actions"] = NumberActionMap(["archivCZSKActions"], { "cancel": self.close, "up": self.pageUp, "down": self.pageDown, }, -2)
def __init__(self, session, title, text=None): BaseArchivCZSKScreen.__init__(self, session) self.changelog = "" try: from Plugins.Extensions.archivCZSK.engine.tools.util import toString if text is not None: self.changelog = toString(text) self.title = toString(title) + ' changelog' except: self.changelog = "failed" log.logError("Convert log file text failed.\n%s"%traceback.format_exc()) pass self["changelog"] = ScrollLabel(self.changelog) self["actions"] = NumberActionMap(["archivCZSKActions"], { "cancel": self.close, "up": self.pageUp, "down": self.pageDown, }, -2)