add DVDBurn to Plugin Menu
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>
Fri, 26 Sep 2008 14:57:54 +0000 (14:57 +0000)
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>
Fri, 26 Sep 2008 14:57:54 +0000 (14:57 +0000)
lib/python/Plugins/Extensions/DVDBurn/plugin.py

index 8e0d743..b658d80 100644 (file)
@@ -1,13 +1,16 @@
 from Plugins.Plugin import PluginDescriptor
 
-def main(session, service, **kwargs):
+def main(session, **kwargs):
        import TitleList
        import DVDProject
        #project = DVDProject.DVDProject()
        #project.addService(service)
-       burner = session.open(TitleList.TitleList)
-       burner.selectedSource(service)
+       return session.open(TitleList.TitleList)
        
+def main_add(session, service, **kwargs):
+       dvdburn = main(session, **kwargs)
+       dvdburn.selectedSource(service)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="DVD Tool", description=_("Burn to DVD..."), where = PluginDescriptor.WHERE_MOVIELIST, fnc=main)
+       return [PluginDescriptor(name="DVD Burn", description=_("Burn to DVD..."), where = PluginDescriptor.WHERE_MOVIELIST, fnc=main_add), 
+               PluginDescriptor(name="DVD Burn", description=_("Burn to DVD..."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) ]