+ self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+ {
+ iPlayableService.evStart: self.__evServiceStart,
+ iPlayableService.evEnd: self.__evServiceEnd
+ })
+
+########## RDS Radiotext / Rass Support BEGIN
+ self.infobar = infobar # reference to real infobar (the one and only)
+ self["RdsDecoder"] = self.info["RdsDecoder"]
+ self["RdsActions"] = HelpableActionMap(self, "InfobarRdsActions",
+ {
+ "startRassInteractive": (self.startRassInteractive, _("View Rass interactive..."))
+ },-1)
+ self["RdsActions"].setEnabled(False)
+ infobar.rds_display.onRassInteractivePossibilityChanged.append(self.RassInteractivePossibilityChanged)
+
+ def startRassInteractive(self):
+ self.info.hide();
+ self.infobar.rass_interactive = self.session.openWithCallback(self.RassInteractiveClosed, RassInteractive)
+
+ def RassInteractiveClosed(self):
+ self.info.show()
+ self.infobar.rass_interactive = None
+ self.infobar.RassSlidePicChanged()
+
+ def RassInteractivePossibilityChanged(self, state):
+ self["RdsActions"].setEnabled(state)
+########## RDS Radiotext / Rass Support END
+
+ def closeRadio(self):
+ self.infobar.rds_display.onRassInteractivePossibilityChanged.remove(self.RassInteractivePossibilityChanged)
+ self.info.hide()
+ #set previous tv service
+ lastservice=eServiceReference(config.tv.lastservice.value)
+ self.session.nav.playService(lastservice)
+ self.close(None)
+
+ def __evServiceStart(self):
+ service = self.session.nav.getCurrentService()
+ if service:
+ info = service.info()
+ if info:
+ refstr = info.getInfoString(iServiceInformation.sServiceref)
+ self.servicelist.setPlayableIgnoreService(eServiceReference(refstr))
+
+ def __evServiceEnd(self):
+ self.servicelist.setPlayableIgnoreService(eServiceReference())
+