diff options
Diffstat (limited to 'module/database/ConfigDatabase.py')
-rw-r--r-- | module/database/ConfigDatabase.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/database/ConfigDatabase.py b/module/database/ConfigDatabase.py index 7dd5909b8..2e9fdd9a0 100644 --- a/module/database/ConfigDatabase.py +++ b/module/database/ConfigDatabase.py @@ -42,6 +42,16 @@ class ConfigMethods(DatabaseMethods): return configs + @queue + def loadConfigsForUser(self, user=None): + if user is None: user = -1 + self.c.execute('SELECT plugin, config FROM settings WHERE user=?', (user,)) + configs = {} + for r in self.c: + configs[r[0]] = r[1] + + return configs + @async def clearAllConfigs(self): self.c.execute('DELETE FROM settings') |