summaryrefslogtreecommitdiffstats
path: root/module/remote
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-22 23:45:38 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-22 23:45:38 +0100
commit958bf611f5d9d117f19f824990ec6fd6b537e967 (patch)
tree558cb45fa61b1738629dff9727c028badccd9990 /module/remote
parentsome bugfixes (diff)
downloadpyload-958bf611f5d9d117f19f824990ec6fd6b537e967.tar.xz
accountmanager v2, delete your accounts.conf and re-enter them in pyload,
new nice debug functions, try core.shell() and core.breakpoint()
Diffstat (limited to 'module/remote')
-rw-r--r--module/remote/socketbackend/ttypes.py25
-rw-r--r--module/remote/thriftbackend/pyload.thrift6
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/ttypes.py72
3 files changed, 40 insertions, 63 deletions
diff --git a/module/remote/socketbackend/ttypes.py b/module/remote/socketbackend/ttypes.py
index ff5ae2467..6589e5923 100644
--- a/module/remote/socketbackend/ttypes.py
+++ b/module/remote/socketbackend/ttypes.py
@@ -27,10 +27,6 @@ class DownloadStatus:
Unknown = 14
Waiting = 5
-class ElementType:
- File = 1
- Package = 0
-
class Input:
BOOL = 4
CHOICE = 6
@@ -49,17 +45,18 @@ class Output:
QUESTION = 2
class AccountInfo(BaseObject):
- __slots__ = ['validuntil', 'login', 'options', 'valid', 'trafficleft', 'maxtraffic', 'premium', 'type']
+ __slots__ = ['plugin', 'loginname', 'valid', 'validuntil', 'trafficleft', 'maxtraffic', 'premium', 'activated', 'options']
- def __init__(self, validuntil=None, login=None, options=None, valid=None, trafficleft=None, maxtraffic=None, premium=None, type=None):
- self.validuntil = validuntil
- self.login = login
- self.options = options
+ def __init__(self, plugin=None, loginname=None, valid=None, validuntil=None, trafficleft=None, maxtraffic=None, premium=None, activated=None, options=None):
+ self.plugin = plugin
+ self.loginname = loginname
self.valid = valid
+ self.validuntil = validuntil
self.trafficleft = trafficleft
self.maxtraffic = maxtraffic
self.premium = premium
- self.type = type
+ self.activated = activated
+ self.options = options
class CaptchaTask(BaseObject):
__slots__ = ['tid', 'data', 'type', 'resultType']
@@ -114,13 +111,11 @@ class DownloadInfo(BaseObject):
self.plugin = plugin
class EventInfo(BaseObject):
- __slots__ = ['eventname', 'id', 'type', 'destination']
+ __slots__ = ['eventname', 'event_args']
- def __init__(self, eventname=None, id=None, type=None, destination=None):
+ def __init__(self, eventname=None, event_args=None):
self.eventname = eventname
- self.id = id
- self.type = type
- self.destination = destination
+ self.event_args = event_args
class FileData(BaseObject):
__slots__ = ['fid', 'url', 'name', 'plugin', 'size', 'format_size', 'status', 'statusmsg', 'packageID', 'error', 'order']
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index c498ef8bf..414a1ebf2 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -157,7 +157,7 @@ struct CaptchaTask {
struct EventInfo {
1: string eventname,
- 2: list<string> args,
+ 2: list<string> event_args,
}
struct UserData {
@@ -170,14 +170,14 @@ struct UserData {
struct AccountInfo {
1: PluginName plugin,
- 2: string login,
+ 2: string loginname,
3: bool valid,
4: i64 validuntil,
5: i64 trafficleft,
6: i64 maxtraffic,
7: bool premium,
8: bool activated,
- 9: map<string list<string>> options,
+ 9: map<string, list<string>> options,
}
struct ServiceCall {
diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
index 3ccca992b..1925029ed 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
@@ -78,20 +78,6 @@ class Destination(TBase):
"Queue": 1,
}
-class ElementType(TBase):
- Package = 0
- File = 1
-
- _VALUES_TO_NAMES = {
- 0: "Package",
- 1: "File",
- }
-
- _NAMES_TO_VALUES = {
- "Package": 0,
- "File": 1,
- }
-
class Input(TBase):
NONE = 0
TEXT = 1
@@ -560,31 +546,23 @@ class EventInfo(TBase):
"""
Attributes:
- eventname
- - id
- - type
- - destination
+ - event_args
"""
__slots__ = [
'eventname',
- 'id',
- 'type',
- 'destination',
+ 'event_args',
]
thrift_spec = (
None, # 0
(1, TType.STRING, 'eventname', None, None, ), # 1
- (2, TType.I32, 'id', None, None, ), # 2
- (3, TType.I32, 'type', None, None, ), # 3
- (4, TType.I32, 'destination', None, None, ), # 4
+ (2, TType.LIST, 'event_args', (TType.STRING,None), None, ), # 2
)
- def __init__(self, eventname=None, id=None, type=None, destination=None,):
+ def __init__(self, eventname=None, event_args=None,):
self.eventname = eventname
- self.id = id
- self.type = type
- self.destination = destination
+ self.event_args = event_args
class UserData(TBase):
@@ -625,48 +603,52 @@ class UserData(TBase):
class AccountInfo(TBase):
"""
Attributes:
- - validuntil
- - login
- - options
+ - plugin
+ - loginname
- valid
+ - validuntil
- trafficleft
- maxtraffic
- premium
- - type
+ - activated
+ - options
"""
__slots__ = [
- 'validuntil',
- 'login',
- 'options',
+ 'plugin',
+ 'loginname',
'valid',
+ 'validuntil',
'trafficleft',
'maxtraffic',
'premium',
- 'type',
+ 'activated',
+ 'options',
]
thrift_spec = (
None, # 0
- (1, TType.I64, 'validuntil', None, None, ), # 1
- (2, TType.STRING, 'login', None, None, ), # 2
- (3, TType.MAP, 'options', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 3
- (4, TType.BOOL, 'valid', None, None, ), # 4
+ (1, TType.STRING, 'plugin', None, None, ), # 1
+ (2, TType.STRING, 'loginname', None, None, ), # 2
+ (3, TType.BOOL, 'valid', None, None, ), # 3
+ (4, TType.I64, 'validuntil', None, None, ), # 4
(5, TType.I64, 'trafficleft', None, None, ), # 5
(6, TType.I64, 'maxtraffic', None, None, ), # 6
(7, TType.BOOL, 'premium', None, None, ), # 7
- (8, TType.STRING, 'type', None, None, ), # 8
+ (8, TType.BOOL, 'activated', None, None, ), # 8
+ (9, TType.MAP, 'options', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 9
)
- def __init__(self, validuntil=None, login=None, options=None, valid=None, trafficleft=None, maxtraffic=None, premium=None, type=None,):
- self.validuntil = validuntil
- self.login = login
- self.options = options
+ def __init__(self, plugin=None, loginname=None, valid=None, validuntil=None, trafficleft=None, maxtraffic=None, premium=None, activated=None, options=None,):
+ self.plugin = plugin
+ self.loginname = loginname
self.valid = valid
+ self.validuntil = validuntil
self.trafficleft = trafficleft
self.maxtraffic = maxtraffic
self.premium = premium
- self.type = type
+ self.activated = activated
+ self.options = options
class ServiceCall(TBase):