add a tux picture for the tuxbox plugins
[enigma2.git] / lib / python / Plugins / tuxboxplugins / plugin.py
index 65f7a86336f9f800274a3a395a9ccdf505737e6b..b700566265e828a09c6243e265fde18cd57b94c3 100644 (file)
@@ -13,20 +13,28 @@ def getPlugins():
        for x in dir:
                try:
                        if x[-3:] == "cfg":
-                               pluginlist.append((getPluginParams(x)["name"], "function", "main", x))
+                               params = getPluginParams(x)
+                               pluginlist.append((params["name"], params["desc"], "function", "main", x))
                except:
                        pass
        return pluginlist
 
+def getPicturePaths():
+       list = []
+       dir = os.listdir("/usr/lib/tuxbox/plugins/")
+       for x in dir: list.append("tuxbox.png")
+       return list
+
 def getPluginParams(file):
-       file = open("/usr/lib/tuxbox/plugins/" + file, "r")
-       lines = file.readlines()
-       file.close()
        params = {}
-       for x in lines:
+       file = open("/usr/lib/tuxbox/plugins/" + file, "r")
+       for x in file.readlines():
                split = x.split("=")
                params[split[0]] = split[1]
+       file.close()
+
        return params
 
 def main(session, args):
-       print "Running plugin with number", args
\ No newline at end of file
+       print "Running plugin " + args[:-4] + ".so with config file", args
+       print getPluginParams(args)
\ No newline at end of file