summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/thriftbackend')
-rw-r--r--module/remote/thriftbackend/ThriftClient.py2
-rw-r--r--module/remote/thriftbackend/pyload.thrift14
-rwxr-xr-xmodule/remote/thriftbackend/thriftgen/pyload/Pyload-remote8
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/Pyload.py52
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/ttypes.py38
5 files changed, 63 insertions, 51 deletions
diff --git a/module/remote/thriftbackend/ThriftClient.py b/module/remote/thriftbackend/ThriftClient.py
index c8e8f2bd7..3b6a56448 100644
--- a/module/remote/thriftbackend/ThriftClient.py
+++ b/module/remote/thriftbackend/ThriftClient.py
@@ -105,4 +105,6 @@ if __name__ == "__main__":
print client.getServices()
print client.call(Pyload.ServiceCall("UpdateManager", "recheckForUpdates"))
+ print client.getConfigValue("download", "limit_speed", "core")
+
client.close() \ No newline at end of file
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index ebe1890e3..00f24f3fa 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -92,8 +92,7 @@ struct FileData {
8: string statusmsg,
9: PackageID packageID,
10: string error,
- 11: i16 order,
- 12: Progress progress
+ 11: i16 order
}
struct PackageData {
@@ -104,9 +103,12 @@ struct PackageData {
5: string password,
6: Destination dest,
7: i16 order,
- 8: Priority priority,
- 9: optional list<FileID> fids,
- 10: optional list<FileData> links
+ 8: optional i16 linksdone,
+ 9: optional i64 sizedone,
+ 10: optional i64 sizetotal,
+ 11: optional i16 linkstotal,
+ 12: optional list<FileData> links,
+ 13: optional list<FileID> fids
}
struct CaptchaTask {
@@ -256,7 +258,7 @@ service Pyload {
void stopDownloads(1: list<FileID> fids),
void setPackageName(1: PackageID pid, 2: string name),
void movePackage(1: Destination destination, 2: PackageID pid),
- void setPriority(1: PackageID pid, 2: Priority priority)
+ void moveFiles(1: list<FileID> fids, 2: PackageID pid),
void orderPackage(1: PackageID pid, 2: i16 position),
void orderFile(1: FileID fid, 2: i16 position),
void setPackageData(1: PackageID pid, 2: map<string, string> data) throws (1: PackageDoesNotExists e),
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
index 8c2b368e1..fd48556dd 100755
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
@@ -70,7 +70,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' void stopDownloads( fids)'
print ' void setPackageName(PackageID pid, string name)'
print ' void movePackage(Destination destination, PackageID pid)'
- print ' void setPriority(PackageID pid, Priority priority)'
+ print ' void moveFiles( fids, PackageID pid)'
print ' void orderPackage(PackageID pid, i16 position)'
print ' void orderFile(FileID fid, i16 position)'
print ' void setPackageData(PackageID pid, data)'
@@ -424,11 +424,11 @@ elif cmd == 'movePackage':
sys.exit(1)
pp.pprint(client.movePackage(eval(args[0]),eval(args[1]),))
-elif cmd == 'setPriority':
+elif cmd == 'moveFiles':
if len(args) != 2:
- print 'setPriority requires 2 args'
+ print 'moveFiles requires 2 args'
sys.exit(1)
- pp.pprint(client.setPriority(eval(args[0]),eval(args[1]),))
+ pp.pprint(client.moveFiles(eval(args[0]),eval(args[1]),))
elif cmd == 'orderPackage':
if len(args) != 2:
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
index 816c6e7d1..ef2b037d5 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
@@ -280,11 +280,11 @@ class Iface(object):
"""
pass
- def setPriority(self, pid, priority):
+ def moveFiles(self, fids, pid):
"""
Parameters:
+ - fids
- pid
- - priority
"""
pass
@@ -1743,32 +1743,32 @@ class Client(Iface):
self._iprot.readMessageEnd()
return
- def setPriority(self, pid, priority):
+ def moveFiles(self, fids, pid):
"""
Parameters:
+ - fids
- pid
- - priority
"""
- self.send_setPriority(pid, priority)
- self.recv_setPriority()
+ self.send_moveFiles(fids, pid)
+ self.recv_moveFiles()
- def send_setPriority(self, pid, priority):
- self._oprot.writeMessageBegin('setPriority', TMessageType.CALL, self._seqid)
- args = setPriority_args()
+ def send_moveFiles(self, fids, pid):
+ self._oprot.writeMessageBegin('moveFiles', TMessageType.CALL, self._seqid)
+ args = moveFiles_args()
+ args.fids = fids
args.pid = pid
- args.priority = priority
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_setPriority(self, ):
+ def recv_moveFiles(self, ):
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(self._iprot)
self._iprot.readMessageEnd()
raise x
- result = setPriority_result()
+ result = moveFiles_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
return
@@ -2437,7 +2437,7 @@ class Processor(Iface, TProcessor):
self._processMap["stopDownloads"] = Processor.process_stopDownloads
self._processMap["setPackageName"] = Processor.process_setPackageName
self._processMap["movePackage"] = Processor.process_movePackage
- self._processMap["setPriority"] = Processor.process_setPriority
+ self._processMap["moveFiles"] = Processor.process_moveFiles
self._processMap["orderPackage"] = Processor.process_orderPackage
self._processMap["orderFile"] = Processor.process_orderFile
self._processMap["setPackageData"] = Processor.process_setPackageData
@@ -3001,13 +3001,13 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_setPriority(self, seqid, iprot, oprot):
- args = setPriority_args()
+ def process_moveFiles(self, seqid, iprot, oprot):
+ args = moveFiles_args()
args.read(iprot)
iprot.readMessageEnd()
- result = setPriority_result()
- self._handler.setPriority(args.pid, args.priority)
- oprot.writeMessageBegin("setPriority", TMessageType.REPLY, seqid)
+ result = moveFiles_result()
+ self._handler.moveFiles(args.fids, args.pid)
+ oprot.writeMessageBegin("moveFiles", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
@@ -4709,30 +4709,30 @@ class movePackage_result(TBase):
)
-class setPriority_args(TBase):
+class moveFiles_args(TBase):
"""
Attributes:
+ - fids
- pid
- - priority
"""
__slots__ = [
+ 'fids',
'pid',
- 'priority',
]
thrift_spec = (
None, # 0
- (1, TType.I32, 'pid', None, None, ), # 1
- (2, TType.BYTE, 'priority', None, None, ), # 2
+ (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1
+ (2, TType.I32, 'pid', None, None, ), # 2
)
- def __init__(self, pid=None, priority=None,):
+ def __init__(self, fids=None, pid=None,):
+ self.fids = fids
self.pid = pid
- self.priority = priority
-class setPriority_result(TBase):
+class moveFiles_result(TBase):
__slots__ = [
]
diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
index e5d22805e..199279dda 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
@@ -291,7 +291,6 @@ class FileData(TBase):
- packageID
- error
- order
- - progress
"""
__slots__ = [
@@ -306,7 +305,6 @@ class FileData(TBase):
'packageID',
'error',
'order',
- 'progress',
]
thrift_spec = (
@@ -322,10 +320,9 @@ class FileData(TBase):
(9, TType.I32, 'packageID', None, None, ), # 9
(10, TType.STRING, 'error', None, None, ), # 10
(11, TType.I16, 'order', None, None, ), # 11
- (12, TType.BYTE, 'progress', None, None, ), # 12
)
- def __init__(self, fid=None, url=None, name=None, plugin=None, size=None, format_size=None, status=None, statusmsg=None, packageID=None, error=None, order=None, progress=None,):
+ def __init__(self, fid=None, url=None, name=None, plugin=None, size=None, format_size=None, status=None, statusmsg=None, packageID=None, error=None, order=None,):
self.fid = fid
self.url = url
self.name = name
@@ -337,7 +334,6 @@ class FileData(TBase):
self.packageID = packageID
self.error = error
self.order = order
- self.progress = progress
class PackageData(TBase):
@@ -350,9 +346,12 @@ class PackageData(TBase):
- password
- dest
- order
- - priority
- - fids
+ - linksdone
+ - sizedone
+ - sizetotal
+ - linkstotal
- links
+ - fids
"""
__slots__ = [
@@ -363,9 +362,12 @@ class PackageData(TBase):
'password',
'dest',
'order',
- 'priority',
- 'fids',
+ 'linksdone',
+ 'sizedone',
+ 'sizetotal',
+ 'linkstotal',
'links',
+ 'fids',
]
thrift_spec = (
@@ -377,12 +379,15 @@ class PackageData(TBase):
(5, TType.STRING, 'password', None, None, ), # 5
(6, TType.I32, 'dest', None, None, ), # 6
(7, TType.I16, 'order', None, None, ), # 7
- (8, TType.BYTE, 'priority', None, None, ), # 8
- (9, TType.LIST, 'fids', (TType.I32,None), None, ), # 9
- (10, TType.LIST, 'links', (TType.STRUCT,(FileData, FileData.thrift_spec)), None, ), # 10
+ (8, TType.I16, 'linksdone', None, None, ), # 8
+ (9, TType.I64, 'sizedone', None, None, ), # 9
+ (10, TType.I64, 'sizetotal', None, None, ), # 10
+ (11, TType.I16, 'linkstotal', None, None, ), # 11
+ (12, TType.LIST, 'links', (TType.STRUCT,(FileData, FileData.thrift_spec)), None, ), # 12
+ (13, TType.LIST, 'fids', (TType.I32,None), None, ), # 13
)
- def __init__(self, pid=None, name=None, folder=None, site=None, password=None, dest=None, order=None, priority=None, fids=None, links=None,):
+ def __init__(self, pid=None, name=None, folder=None, site=None, password=None, dest=None, order=None, linksdone=None, sizedone=None, sizetotal=None, linkstotal=None, links=None, fids=None,):
self.pid = pid
self.name = name
self.folder = folder
@@ -390,9 +395,12 @@ class PackageData(TBase):
self.password = password
self.dest = dest
self.order = order
- self.priority = priority
- self.fids = fids
+ self.linksdone = linksdone
+ self.sizedone = sizedone
+ self.sizetotal = sizetotal
+ self.linkstotal = linkstotal
self.links = links
+ self.fids = fids
class CaptchaTask(TBase):