use new async picture ePicLoad facilities and save temporary downloads to /tmp rather...
[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         if zapperInstance is not None:
18                 zapperInstance.shutdown()
19                 zapperInstance = None
20
21 def Plugins(**kwargs):
22         return [
23                 PluginDescriptor(
24                         name="Werbezapper",
25                         description="Automatically zaps back to current service after given Time",
26                         where = PluginDescriptor.WHERE_EXTENSIONSMENU,
27                         fnc=main
28                 )
29         ]