just call plugin with servicelist as kwarg
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index f1744fed053708b9da96e18d31ad39a4ec5f7bae..0c0916f6d4da1bd404443af7fd84f2a631364b89 100644 (file)
@@ -5,10 +5,9 @@ from Components.ActionMap import NumberActionMap
 from Components.BlinkingPixmap import BlinkingPixmapConditional
 from Components.Harddisk import harddiskmanager
 from Components.Input import Input
-from Components.Label import *
-from Components.Pixmap import Pixmap, PixmapConditional
+from Components.Label import Label
+from Components.Pixmap import Pixmap
 from Components.PluginComponent import plugins
-from Components.ProgressBar import *
 from Components.ServiceEventTracker import ServiceEventTracker
 from Components.Sources.CurrentService import CurrentService
 from Components.Sources.EventInfo import EventInfo
@@ -406,6 +405,7 @@ class InfoBarEPG:
                self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", 
                        {
                                "showEventInfo": (self.openEventView, _("show EPG...")),
+                               "showSingleServiceEPG": (self.openSingleServiceEPG, _("show single service EPG...")),
                                "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible,
                        })
 
@@ -670,6 +670,8 @@ class InfoBarSeek:
                self["SeekActions"].setEnabled(False)
 
                self.seekstate = self.SEEK_STATE_PLAY
+               
+               self.seek_flag = True
 
                self.onPlayStateChanged = [ ]
 
@@ -832,6 +834,7 @@ class InfoBarSeek:
                                seekable.seekRelative(-1, 3)
 
        def seekFwdDef(self):
+               self.seek_flag = False
                seconds = config.usage.self_defined_seek.value
                print "Seek", seconds, "seconds self defined forward"
                seekable = self.getSeek()
@@ -839,6 +842,7 @@ class InfoBarSeek:
                        seekable.seekRelative(1, seconds * 90000)
                
        def seekBackDef(self):
+               self.seek_flag = False
                seconds = config.usage.self_defined_seek.value
                print "Seek", seconds, "seconds self defined backward"
                seekable = self.getSeek()
@@ -893,11 +897,14 @@ class InfoBarSeek:
                self.doSeek(0)
 
        def seekRelative(self, diff):
-               seekable = self.getSeek()
-               if seekable is not None:
-                       print "seekRelative: res:", seekable.seekRelative(1, diff)
+               if self.seek_flag == True:
+                       seekable = self.getSeek()
+                       if seekable is not None:
+                               print "seekRelative: res:", seekable.seekRelative(1, diff)
+                       else:
+                               print "seek failed!"
                else:
-                       print "seek failed!"
+                       self.seek_flag = True
 
        def seekRelativeToEnd(self, diff):
                assert diff <= 0, "diff is expected to be negative!"
@@ -1197,7 +1204,7 @@ class InfoBarPlugins:
                return list
 
        def runPlugin(self, plugin):
-               plugin(session = self.session)
+               plugin(session = self.session, servicelist = self.servicelist)
 
 # depends on InfoBarExtensions
 class InfoBarSleepTimer: