diff options
Diffstat (limited to 'pyload/remote')
| -rw-r--r-- | pyload/remote/apitypes.py | 15 | ||||
| -rw-r--r-- | pyload/remote/apitypes_debug.py | 3 | ||||
| -rw-r--r-- | pyload/remote/pyload.thrift | 16 | 
3 files changed, 29 insertions, 5 deletions
| diff --git a/pyload/remote/apitypes.py b/pyload/remote/apitypes.py index 555deca9f..ab68116c3 100644 --- a/pyload/remote/apitypes.py +++ b/pyload/remote/apitypes.py @@ -95,6 +95,15 @@ class Permission:  	Interaction = 32  	Plugins = 64 +class ProgressType: +	All = 0 +	Other = 1 +	Download = 2 +	Decrypting = 4 +	LinkCheck = 8 +	Addon = 16 +	FileOperation = 32 +  class Role:  	Admin = 0  	User = 1 @@ -300,15 +309,17 @@ class PackageStats(BaseObject):  		self.sizedone = sizedone  class ProgressInfo(BaseObject): -	__slots__ = ['plugin', 'name', 'statusmsg', 'eta', 'done', 'total', 'download'] +	__slots__ = ['plugin', 'name', 'statusmsg', 'eta', 'done', 'total', 'owner', 'type', 'download'] -	def __init__(self, plugin=None, name=None, statusmsg=None, eta=None, done=None, total=None, download=None): +	def __init__(self, plugin=None, name=None, statusmsg=None, eta=None, done=None, total=None, owner=None, type=None, download=None):  		self.plugin = plugin  		self.name = name  		self.statusmsg = statusmsg  		self.eta = eta  		self.done = done  		self.total = total +		self.owner = owner +		self.type = type  		self.download = download  class ServerStatus(BaseObject): diff --git a/pyload/remote/apitypes_debug.py b/pyload/remote/apitypes_debug.py index 74b86f3a8..d5e5f36a0 100644 --- a/pyload/remote/apitypes_debug.py +++ b/pyload/remote/apitypes_debug.py @@ -14,6 +14,7 @@ enums = [  	"MediaType",  	"PackageStatus",  	"Permission", +	"ProgressType",  	"Role",  ] @@ -37,7 +38,7 @@ classes = {  	'PackageDoesNotExist' : [int],  	'PackageInfo' : [int, basestring, basestring, int, int, basestring, basestring, basestring, int, (list, basestring), int, bool, int, PackageStats, (list, int), (list, int)],  	'PackageStats' : [int, int, int, int], -	'ProgressInfo' : [basestring, basestring, basestring, int, int, int, (None, DownloadProgress)], +	'ProgressInfo' : [basestring, basestring, basestring, int, int, int, int, int, (None, DownloadProgress)],  	'ServerStatus' : [int, int, int, int, int, bool, bool, bool, bool],  	'ServiceDoesNotExist' : [basestring, basestring],  	'ServiceException' : [basestring], diff --git a/pyload/remote/pyload.thrift b/pyload/remote/pyload.thrift index 9b8415d0f..a9431ea7c 100644 --- a/pyload/remote/pyload.thrift +++ b/pyload/remote/pyload.thrift @@ -116,6 +116,16 @@ enum Role {      User = 1  } +enum ProgressType { +    All = 0, +    Other = 1, +    Download = 2, +    Decrypting = 4, +    LinkCheck = 8, +    Addon = 16, +    FileOperation = 32, +} +  struct Input {      1: InputType type,      2: optional JSONString default_value, @@ -135,8 +145,10 @@ struct ProgressInfo {    3: string statusmsg,    4: i32 eta, // in seconds    5: ByteCount done, -  6: ByteCount total, // arbitary number, size in case of files -  7: optional DownloadProgress download +  6: ByteCount total, // arbitary number, size in case of files, +  7: UserID owner, +  8: ProgressType type, +  9: optional DownloadProgress download //only given when progress type download  }  // download info for specific file | 
