[MerlinEPG] add event-search function
authorvali <vali@andLinux.(none)>
Mon, 31 Jan 2011 09:01:03 +0000 (04:01 -0500)
committervali <vali@andLinux.(none)>
Mon, 31 Jan 2011 09:01:03 +0000 (04:01 -0500)
merlinepg/src/help.jpg
merlinepg/src/plugin.py

index 3cf3dc9..e15b916 100644 (file)
Binary files a/merlinepg/src/help.jpg and b/merlinepg/src/help.jpg differ
index 5d63711..6e74bad 100644 (file)
@@ -332,7 +332,8 @@ class Merlin_PGII(Screen):
                                                "7": self.findPrvBqt,
                                                "9": self.findNextBqt,
                                                "showMovies": self.editCurTimer,
-                                               "showTv": self.fullEPGlist
+                                               "showTv": self.fullEPGlist,
+                                               "showRadio": self.runEpgSeartch
                                                },-2)
                self.onLayoutFinish.append(self.onLayoutReady)
 
@@ -665,6 +666,15 @@ class Merlin_PGII(Screen):
                else:
                        self.session.open(MessageBox, text = _('EPGsearch is not installed!'), type = MessageBox.TYPE_ERROR)
 
+       def runEpgSeartch(self):
+               if epgSpresent:
+                       cur = self["epg_list"+str(self.ActiveEPG)].getCurrent()
+                       epg_event = cur[0]
+                       epg_name = epg_event and epg_event.getEventName() or ''
+                       self.session.open(EPGSearch, epg_name, False)
+               else:
+                       self.session.open(MessageBox, text = _('EPGsearch is not installed!'), type = MessageBox.TYPE_ERROR)
+
 
 
 class Merlin_PGd(Screen):
@@ -759,7 +769,8 @@ class Merlin_PGd(Screen):
                                                                        "down": self.down,
                                                                        "downRepeated": self.down,
                                                                        "showMovies": self.editCurTimer,
-                                                                       "showTv": self.fullEPGlist
+                                                                       "showTv": self.fullEPGlist,
+                                                                       "showRadio": self.runEpgSeartch
                                                                        },-2)
                self.onLayoutFinish.append(self.onLayoutReady)
 
@@ -944,6 +955,15 @@ class Merlin_PGd(Screen):
                else:
                        self.session.open(MessageBox, text = _('EPGsearch is not installed!'), type = MessageBox.TYPE_ERROR)
 
+       def runEpgSeartch(self):
+               if epgSpresent:
+                       cur = self["epg_list"].getCurrent()
+                       epg_event = cur[0]
+                       epg_name = epg_event and epg_event.getEventName() or ''
+                       self.session.open(EPGSearch, epg_name, False)
+               else:
+                       self.session.open(MessageBox, text = _('EPGsearch is not installed!'), type = MessageBox.TYPE_ERROR)
+
 
 
 if epgSpresent: