get_plugin_config changed to top level folders

This commit is contained in:
Data-Monkey
2023-05-17 11:39:29 +10:00
parent 941a8ef661
commit c54156ca1e

View File

@@ -3770,9 +3770,12 @@ def get_plugins_configs():
pluginsList = []
for root, dirs, files in os.walk(pluginsPath):
for d in dirs: # Loop over directories, not files
pluginsList.append(json.loads(get_file_content(pluginsPath + "/" + d + '/config.json')))
# only top level directories required. No need for the loop
# for root, dirs, files in os.walk(pluginsPath):
dirs = next(os.walk(pluginsPath))[1]
for d in dirs: # Loop over directories, not files
pluginsList.append(json.loads(get_file_content(pluginsPath + "/" + d + '/config.json')))
return pluginsList