+ def getSimilarEvents(self):
+ # search similar broadcastings
+ refstr = str(self.currentService)
+ id = self.event.getEventId()
+ epgcache = eEPGCache.getInstance()
+ ret = epgcache.search(('NB', 100, eEPGCache.SIMILAR_BROADCASTINGS_SEARCH, refstr, id))
+ if ret is not None:
+ descr = self["epg_description"]
+ text = descr.getText()
+ text += '\n\n' + _('Similar broadcasts:')
+ ret.sort(self.sort_func)
+ for x in ret:
+ t = localtime(x[1])
+ text += '\n%d.%d.%d, %02d:%02d - %s'%(t[2], t[1], t[0], t[3], t[4], x[0])
+ descr.setText(text)
+ self["key_red"].setText(_("Similar"))
+
+ def openSimilarList(self):
+ if self.similarEPGCB is not None and len(self["key_red"].getText()):
+ id = self.event and self.event.getEventId()
+ refstr = str(self.currentService)
+ if id is not None:
+ self.similarEPGCB(id, refstr)
+