4.2.7r1
[enigma2.git] / usr / lib / enigma2 / python / Plugins / Extensions / MediaRenderer / plugin.py
1 # -*- coding: UTF-8 -*-
2 from Components.config import config
3 from Plugins.SystemPlugins.UPnP.UPnPMediaRenderer import restartMediaRenderer
4 from Plugins.Plugin import PluginDescriptor
5 from Plugins.SystemPlugins.UPnP.UPnPConfig import getUUID
6
7 from PlayerImpl import PlayerImpl
8
9 def start(reason, session=None, **kwargs):
10         if session and reason == 0 and config.plugins.mediarenderer.enabled.value:
11                 restartMediaRenderer(
12                                 session,
13                                 PlayerImpl(session),
14                                 config.plugins.mediarenderer.name.value,
15                                 getUUID(config.plugins.mediarenderer.uuid),
16                                 manufacturer='dreambox',
17                                 manufacturer_url='http://www.dreambox.de',
18                                 model_description='Dreambox MediaRenderer',
19                                 model_name=config.plugins.mediarenderer.name.value,
20                                 model_number=config.plugins.mediarenderer.name.value,
21                                 model_url='http://www.dreambox.de'
22                         )
23
24 def Plugins(**kwargs):
25         return [ PluginDescriptor(where=[PluginDescriptor.WHERE_UPNP, PluginDescriptor.WHERE_UPNP], fnc=start) ]