From 9b9ba2a20409486e6645e0429220447f84199cc7 Mon Sep 17 00:00:00 2001
From: RaNaN <Mast3rRaNaN@hotmail.de>
Date: Sat, 30 Mar 2013 16:38:37 +0100
Subject: show active addons

---
 module/api/ConfigApi.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'module/api')

diff --git a/module/api/ConfigApi.py b/module/api/ConfigApi.py
index d5577f7c3..b2327eb9a 100644
--- a/module/api/ConfigApi.py
+++ b/module/api/ConfigApi.py
@@ -65,9 +65,13 @@ class ConfigApi(ApiComponent):
         :rtype: list of PluginInfo
         """
         # TODO: include addons that are activated by default
+        # TODO: multi user
         data = []
+        active = [x.getName() for x in self.core.addonManager.activePlugins()]
         for name, config, values in self.core.config.iterSections(self.user):
-            if not values: continue
+            # skip unmodified and inactive addons
+            if not values and name not in active: continue
+
             item = ConfigInfo(name, config.name, config.description,
                               self.core.pluginManager.getCategory(name),
                               self.core.pluginManager.isUserPlugin(name),
-- 
cgit v1.2.3