diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-07-10 12:18:01 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-07-10 12:18:01 +0000 |
| commit | 50b838e3fa4cce4cb9dee15f1fe1303d0ae380f2 (patch) | |
| tree | 1bbe200dd536774fa38185bdc614bd21db3ba109 /lib/python | |
| parent | ec9149a16b290d45f797008ba6a00fc63b105b6c (diff) | |
| download | enigma2-50b838e3fa4cce4cb9dee15f1fe1303d0ae380f2.tar.gz enigma2-50b838e3fa4cce4cb9dee15f1fe1303d0ae380f2.zip | |
retune previous running foreground service after leave satfinder
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/TunerInfo.py | 18 | ||||
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/Satfinder/plugin.py | 11 |
2 files changed, 19 insertions, 10 deletions
diff --git a/lib/python/Components/TunerInfo.py b/lib/python/Components/TunerInfo.py index a7e22fb1..490b9bef 100644 --- a/lib/python/Components/TunerInfo.py +++ b/lib/python/Components/TunerInfo.py @@ -86,15 +86,15 @@ class TunerInfo(GUIComponent): return feinfo.getFrontendInfo(iFrontendInformation.lockState) elif self.frontendfkt is not None: frontend = self.frontendfkt() - if what == self.SNR: - return frontend.readFrontendData(iFrontendInformation.signalPower) - elif what == self.AGC: - return frontend.readFrontendData(iFrontendInformation.signalQuality) - elif what == self.BER: - return frontend.readFrontendData(iFrontendInformation.bitErrorRate) - elif what == self.LOCK: - return frontend.readFrontendData(iFrontendInformation.lockState) - + if frontend: + if what == self.SNR: + return frontend.readFrontendData(iFrontendInformation.signalPower) + elif what == self.AGC: + return frontend.readFrontendData(iFrontendInformation.signalQuality) + elif what == self.BER: + return frontend.readFrontendData(iFrontendInformation.bitErrorRate) + elif what == self.LOCK: + return frontend.readFrontendData(iFrontendInformation.lockState) return 0 def createWidget(self, parent): diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py index fceff4ce..d915b91f 100644 --- a/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Satfinder/plugin.py @@ -77,8 +77,10 @@ class Satfinder(ScanSetup): def __init__(self, session, feid): self.initcomplete = False self.feid = feid - + self.oldref = None + if not self.openFrontend(): + self.oldref = session.nav.getCurrentlyPlayingServiceReference() session.nav.stopService() # try to disable foreground service if not self.openFrontend(): if session.pipshown: # try to disable pip @@ -110,6 +112,7 @@ class Satfinder(ScanSetup): self.statusTimer.start(50, False) self.initcomplete = True + self.session = session def updateStatus(self): self["snr_percentage"].update() @@ -221,6 +224,11 @@ class Satfinder(ScanSetup): self.retune(config.tuning.type) def keyCancel(self): + if self.oldref: + if self.frontend: + self.frontend = None + del self.raw_channel + self.session.nav.playService(self.oldref) self.close(None) def tune(self, transponder): @@ -269,5 +277,6 @@ def SatfinderMain(session, **kwargs): else: session.open(MessageBox, _("No tuner is configured for use with a diseqc positioner!"), MessageBox.TYPE_ERROR) + def Plugins(**kwargs): return PluginDescriptor(name="Satfinder", description="Helps setting up your dish", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=SatfinderMain) |
