- save service names in xml,
[enigma2-plugins.git] / werbezapper / src / plugin.py
1 # Plugin
2 from Plugins.Plugin import PluginDescriptor
3
4 zapperInstance = None
5
6 # Mainfunction
7 def main(session, servicelist, **kwargs):
8         # Create Instance if none present, show Dialog afterwards
9         global zapperInstance
10         if zapperInstance is None:
11                 from WerbeZapper import WerbeZapper
12                 zapperInstance = WerbeZapper(session, servicelist, cleanup)
13         zapperInstance.showSelection()
14
15 def cleanup():
16         global zapperInstance
17         zapperInstance = None
18
19 def Plugins(**kwargs):
20         return [
21                 PluginDescriptor(
22                         name="Werbezapper",
23                         description="Automatically zaps back to current service after given Time",
24                         where = PluginDescriptor.WHERE_EXTENSIONSMENU,
25                         fnc=main
26                 )
27         ]