summaryrefslogtreecommitdiffstats
path: root/pyload/remote
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/remote')
-rw-r--r--pyload/remote/json_converter.py11
-rw-r--r--pyload/remote/pyload.thrift6
2 files changed, 14 insertions, 3 deletions
diff --git a/pyload/remote/json_converter.py b/pyload/remote/json_converter.py
index a7a0645ce..b4e57c4a0 100644
--- a/pyload/remote/json_converter.py
+++ b/pyload/remote/json_converter.py
@@ -59,6 +59,17 @@ def dumps(*args, **kwargs):
return json.dumps(*args, **kwargs)
+def dump(*args, **kwargs):
+ if 'compact' in kwargs and kwargs['compact']:
+ kwargs['cls'] = BaseEncoderCompact
+ del kwargs['compact']
+ else:
+ kwargs['cls'] = BaseEncoder
+
+ kwargs['separators'] = separators
+ return json.dump(*args, **kwargs)
+
+
def loads(*args, **kwargs):
kwargs['object_hook'] = convert_obj
return json.loads(*args, **kwargs) \ No newline at end of file
diff --git a/pyload/remote/pyload.thrift b/pyload/remote/pyload.thrift
index 905be22b0..3d0f201e7 100644
--- a/pyload/remote/pyload.thrift
+++ b/pyload/remote/pyload.thrift
@@ -495,6 +495,9 @@ service Pyload {
// returns own user data
UserData getUserData(),
+ // works contextual, admin can change every password
+ bool setPassword(1: string username, 2: string old_password, 3: string new_password),
+
// all user, for admins only
map<UserID, UserData> getAllUserData(),
@@ -504,9 +507,6 @@ service Pyload {
void updateUserData(1: UserData data),
void removeUser(1: UserID uid),
- // works contextual, admin can change every password
- bool setPassword(1: string username, 2: string old_password, 3: string new_password),
-
///////////////////////
// Addon Methods
///////////////////////