From 961239a024248ee557f1d4fe6797c7f27e2ecf6b Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 18 May 2007 01:49:59 +0000 Subject: NIM cleanup, as described in https://lists.elitedvb.net/pipermail/enigma2-devel/2007-May/000016.html --- .../SystemPlugins/SatelliteEquipmentControl/plugin.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py') diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py index 5369ccf0..bb745920 100644 --- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py @@ -52,14 +52,17 @@ def SecSetupMain(Session, **kwargs): def SecSetupStart(menuid): show = False - for slot in nimmgr.nimslots: - if slot.nimType == nimmgr.nimType["DVB-S"]: - show = True - break - if show and menuid == "scan": - return [(_("Satellite Equipment Setup"), SecSetupMain)] - else: - return [] + + # other menu than "scan"? + if menuid != "scan": + return [ ] + + # only show if DVB-S frontends are available + for slot in nimmgr.nim_slots: + if slot.isCompatible("DVB-S"): + return [(_("Satellite Equipment Setup"), SecSetupMain)] + + return [ ] def Plugins(**kwargs): return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_SETUP, fnc=SecSetupStart) -- cgit v1.2.3