enigma2 20130114 (master) -> 20130216 (master)
[enigma2.git] / usr / lib / enigma2 / python / Plugins / SystemPlugins / UPnP / plugin.py
1 from Plugins.Plugin import PluginDescriptor
2 from Components.ResourceManager import resourcemanager
3
4 #shut down the controlpoint with all devices we registered until now so they disappear from all clients
5 def autostart(reason, **kwargs):
6         if reason == 1:
7                 cp = resourcemanager.getResource("UPnPControlPoint")
8                 if cp:
9                         cp.shutdown()
10
11 def Plugins(**kwargs):
12         return PluginDescriptor(where=PluginDescriptor.WHERE_AUTOSTART, fnc=autostart)