X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/44c32e4101acdeb6df3833f35e9c0719e993a2a5..09565fe7720e8e042712b42a9dc7aac2949130cb:/lib/python/Screens/InfoBarGenerics.py diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 5ff227da..eb79c74e 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -403,8 +403,8 @@ class InfoBarEPG: self.eventView = None self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { - "showEventInfo": (self.openEventView, _("show EPG...")), - "showSingleServiceEPG": (self.openSingleServiceEPG, _("show single service EPG...")), + "showEventView": (self.openEventView, _("show EPG...")), + "showEventInfoPlugin": (self.showEventInfoPlugins, _("show single service EPG...")), "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible, }) @@ -489,6 +489,23 @@ class InfoBarEPG: ref=self.session.nav.getCurrentlyPlayingServiceReference() self.session.open(EPGSelection, ref) + def showEventInfoPlugins(self): + list = [] + for p in plugins.getPlugins(where = PluginDescriptor.WHERE_EVENTINFO): + list.append((p.name, boundFunction(self.runPlugin, p))) + if len(list): + list.append((_("show single service EPG..."), self.openSingleServiceEPG)) + self.session.openWithCallback(self.EventInfoPluginChosen, ChoiceBox, title=_("Please choose an extension..."), list = list) + else: + self.openSingleServiceEPG() + + def runPlugin(self, plugin): + plugin(session = self.session, servicelist = self.servicelist) + + def EventInfoPluginChosen(self, answer): + if answer is not None: + answer[1]() + def openSimilarList(self, eventid, refstr): self.session.open(EPGSelection, refstr, None, eventid) @@ -1258,7 +1275,6 @@ class InfoBarExtensions: from Tools.BoundFunction import boundFunction # depends on InfoBarExtensions -from Components.PluginComponent import plugins class InfoBarPlugins: def __init__(self): @@ -1296,7 +1312,6 @@ class InfoBarJobman: self.session.openWithCallback(self.JobViewCB, JobView, job) def JobViewCB(self, in_background): - from Screens.TaskView import JobView job_manager.in_background = in_background # depends on InfoBarExtensions @@ -1505,7 +1520,7 @@ class InfoBarInstantRecord: localendtime = localtime(ret[1]) print "stopping recording at", strftime("%c", localendtime) if self.recording[self.selectedEntry].end != ret[1]: - recording.autoincrease = False + self.recording[self.selectedEntry].autoincrease = False self.recording[self.selectedEntry].end = ret[1] self.session.nav.RecordTimer.timeChanged(self.recording[self.selectedEntry]) @@ -1518,7 +1533,7 @@ class InfoBarInstantRecord: if value is not None: print "stopping recording after", int(value), "minutes." if int(value) != 0: - recording.autoincrease = False + self.recording[self.selectedEntry].autoincrease = False self.recording[self.selectedEntry].end = time() + 60 * int(value) self.session.nav.RecordTimer.timeChanged(self.recording[self.selectedEntry])