summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/config/ConfigParser.py11
-rw-r--r--module/database/FileDatabase.py2
-rw-r--r--module/remote/thriftbackend/pyload.thrift18
3 files changed, 13 insertions, 18 deletions
diff --git a/module/config/ConfigParser.py b/module/config/ConfigParser.py
index 01f4268cb..33b3d26b6 100644
--- a/module/config/ConfigParser.py
+++ b/module/config/ConfigParser.py
@@ -102,7 +102,7 @@ class ConfigParser:
continue
if name in self.config[section].config:
- self.set(section, name, value)
+ self.set(section, name, value, sync=False)
else:
print "Unrecognized option", section, name
@@ -147,7 +147,7 @@ class ConfigParser:
else:
return self.config[section].config[option].default
- def set(self, section, option, value):
+ def set(self, section, option, value, sync=True):
"""set value"""
data = self.config[section].config[option]
@@ -156,8 +156,9 @@ class ConfigParser:
# only save when different to defaul values
if value != data.default or (option in self.values[section] and value != self.values[section][option]):
self.values[section][option] = value
- if self.changeCB: self.changeCB(section, option, value)
- self.save()
+ if sync:
+ if self.changeCB: self.changeCB(section, option, value)
+ self.save()
def getPlugin(self, *args):
"""gets a value for a plugin"""
@@ -204,7 +205,7 @@ class ConfigParser:
d[conf_name] = ConfigData(gettext(conf_desc), type, gettext(conf_verbose), from_string(default, type))
if base:
- self.baseSections.append(section)
+ if section not in self.baseSections: self.baseSections.append(section)
else:
if section in self.config:
print "Section already exists", section
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py
index 895e0de65..4084c46f7 100644
--- a/module/database/FileDatabase.py
+++ b/module/database/FileDatabase.py
@@ -340,7 +340,7 @@ class FileHandler:
if "decrypt" in self.jobCache:
return None
- plugins = self.core.pluginManager.crypterPlugins.keys() + self.core.pluginManager.containerPlugins.keys()
+ plugins = self.core.pluginManager.getPlugins("crypter").keys() + self.core.pluginManager.getPlugins("container").keys()
plugins = str(tuple(plugins))
jobs = self.db.getPluginJob(plugins)
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index ace24e709..c498ef8bf 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -34,11 +34,6 @@ enum Destination {
Queue
}
-enum ElementType {
- Package,
- File
-}
-
// types for user interaction
// some may only be place holder currently not supported
// also all input - output combination are not reasonable, see InteractionManager for further info
@@ -162,9 +157,7 @@ struct CaptchaTask {
struct EventInfo {
1: string eventname,
- 2: optional i32 id,
- 3: optional ElementType type,
- 4: optional Destination destination
+ 2: list<string> args,
}
struct UserData {
@@ -176,14 +169,15 @@ struct UserData {
}
struct AccountInfo {
- 1: i64 validuntil,
+ 1: PluginName plugin,
2: string login,
- 3: map<string, list<string>> options,
- 4: bool valid,
+ 3: bool valid,
+ 4: i64 validuntil,
5: i64 trafficleft,
6: i64 maxtraffic,
7: bool premium,
- 8: string type,
+ 8: bool activated,
+ 9: map<string list<string>> options,
}
struct ServiceCall {