summaryrefslogtreecommitdiffstats
path: root/module/remote
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-10 11:49:35 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-10 11:49:35 +0200
commit54bc92b4c5e0b3543a313f497cbc2276403c5980 (patch)
tree60e220c41998d9a41dd9a0b94e9c6a5ee02ae86d /module/remote
parentnew config api (diff)
downloadpyload-54bc92b4c5e0b3543a313f497cbc2276403c5980.tar.xz
changed config + progress api
Diffstat (limited to 'module/remote')
-rw-r--r--module/remote/socketbackend/ttypes.py35
-rw-r--r--module/remote/thriftbackend/pyload.thrift48
-rwxr-xr-xmodule/remote/thriftbackend/thriftgen/pyload/Pyload-remote47
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/Pyload.py417
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/ttypes.py105
5 files changed, 266 insertions, 386 deletions
diff --git a/module/remote/socketbackend/ttypes.py b/module/remote/socketbackend/ttypes.py
index fd520f418..f4697e39e 100644
--- a/module/remote/socketbackend/ttypes.py
+++ b/module/remote/socketbackend/ttypes.py
@@ -154,6 +154,15 @@ class DownloadInfo(BaseObject):
self.statusmsg = statusmsg
self.error = error
+class DownloadProgress(BaseObject):
+ __slots__ = ['fid', 'pid', 'speed', 'status']
+
+ def __init__(self, fid=None, pid=None, speed=None, status=None):
+ self.fid = fid
+ self.pid = pid
+ self.speed = speed
+ self.status = status
+
class EventInfo(BaseObject):
__slots__ = ['eventname', 'event_args']
@@ -248,25 +257,17 @@ class PackageStats(BaseObject):
self.sizedone = sizedone
class ProgressInfo(BaseObject):
- __slots__ = ['fid', 'name', 'speed', 'eta', 'format_eta', 'bleft', 'size', 'format_size', 'percent', 'status', 'statusmsg', 'format_wait', 'wait_until', 'packageID', 'packageName', 'plugin']
+ __slots__ = ['plugin', 'name', 'statusmsg', 'eta', 'format_eta', 'done', 'total', 'download']
- def __init__(self, fid=None, name=None, speed=None, eta=None, format_eta=None, bleft=None, size=None, format_size=None, percent=None, status=None, statusmsg=None, format_wait=None, wait_until=None, packageID=None, packageName=None, plugin=None):
- self.fid = fid
+ def __init__(self, plugin=None, name=None, statusmsg=None, eta=None, format_eta=None, done=None, total=None, download=None):
+ self.plugin = plugin
self.name = name
- self.speed = speed
+ self.statusmsg = statusmsg
self.eta = eta
self.format_eta = format_eta
- self.bleft = bleft
- self.size = size
- self.format_size = format_size
- self.percent = percent
- self.status = status
- self.statusmsg = statusmsg
- self.format_wait = format_wait
- self.wait_until = wait_until
- self.packageID = packageID
- self.packageName = packageName
- self.plugin = plugin
+ self.done = done
+ self.total = total
+ self.download = download
class ServerStatus(BaseObject):
__slots__ = ['pause', 'active', 'queue', 'total', 'speed', 'download', 'reconnect']
@@ -359,7 +360,7 @@ class Iface:
pass
def deleteCollPack(self, name):
pass
- def deleteConfig(self, config):
+ def deleteConfig(self, plugin):
pass
def deleteFiles(self, fids):
pass
@@ -469,8 +470,6 @@ class Iface:
pass
def setConfigHandler(self, plugin, iid, value):
pass
- def setFilePaused(self, fid, paused):
- pass
def setInteractionResult(self, iid, result):
pass
def setPackageData(self, pid, data):
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index fb906e23a..8257107b4 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -98,25 +98,22 @@ enum Role {
User = 1
}
-// TODO: progress vs Download progress ?!
+struct DownloadProgress {
+ 1: FileID fid,
+ 2: PackageID pid,
+ 3: ByteCount speed,
+ 4: DownloadStatus status,
+}
struct ProgressInfo {
- 1: FileID fid,
+ 1: PluginName plugin,
2: string name,
- 3: ByteCount speed,
- 4: i32 eta,
+ 3: string statusmsg,
+ 4: i32 eta, // in seconds
5: string format_eta,
- 6: ByteCount bleft,
- 7: ByteCount size,
- 8: string format_size,
- 9: i16 percent,
- 10: DownloadStatus status,
- 11: string statusmsg,
- 12: string format_wait,
- 13: UTCDate wait_until,
- 14: PackageID packageID,
- 15: string packageName,
- 16: PluginName plugin,
+ 6: ByteCount done,
+ 7: ByteCount total, // arbitary number, size in case of files
+ 8: optional DownloadProgress download
}
struct ServerStatus {
@@ -328,6 +325,8 @@ service Pyload {
// TODO
//void scanDownloadFolder(),
+ list<ProgressInfo> getProgressInfo(),
+
///////////////////////
// Configuration
///////////////////////
@@ -338,7 +337,7 @@ service Pyload {
ConfigHolder configurePlugin(1: PluginName plugin),
void saveConfig(1: ConfigHolder config),
- void deleteConfig(1: ConfigHolder config),
+ void deleteConfig(1: PluginName plugin),
void setConfigHandler(1: PluginName plugin, 2: InteractionID iid, 3: JSONString value),
///////////////////////
@@ -387,8 +386,6 @@ service Pyload {
// Collector
///////////////////////
- // TODO: reasonable link collector concept
-
list<LinkStatus> getCollector(),
void addToCollector(1: LinkList links),
@@ -423,13 +420,13 @@ service Pyload {
void restartFile(1: FileID fid),
void recheckPackage(1: PackageID pid),
void restartFailed(),
+ void stopDownloads(1: list<FileID> fids),
+ void stopAllDownloads(),
/////////////////////////
// Modify Files/Packages
/////////////////////////
- void setFilePaused(1: FileID fid, 2: bool paused) throws (1: FileDoesNotExists e),
-
// moving package while downloading is not possible, so they will return bool to indicate success
void setPackagePaused(1: PackageID pid, 2: bool paused) throws (1: PackageDoesNotExists e),
bool setPackageFolder(1: PackageID pid, 2: string path) throws (1: PackageDoesNotExists e),
@@ -443,17 +440,6 @@ service Pyload {
void orderFiles(1: list<FileID> fids, 2: PackageID pid, 3: i16 position),
///////////////////////
- // Taks/Progress
- ///////////////////////
-
- // downloads - information
- list<ProgressInfo> getProgressInfo(),
- void stopDownloads(1: list<FileID> fids),
- void stopAllDownloads(),
-
- // TODO - progress methods and data type
-
- ///////////////////////
// User Interaction
///////////////////////
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
index 78d251501..20015ba43 100755
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
@@ -35,12 +35,13 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' bool isTimeDownload()'
print ' bool isTimeReconnect()'
print ' bool toggleReconnect()'
+ print ' getProgressInfo()'
print ' getConfig()'
print ' getGlobalPlugins()'
print ' getUserPlugins()'
print ' ConfigHolder configurePlugin(PluginName plugin)'
print ' void saveConfig(ConfigHolder config)'
- print ' void deleteConfig(ConfigHolder config)'
+ print ' void deleteConfig(PluginName plugin)'
print ' void setConfigHandler(PluginName plugin, InteractionID iid, JSONString value)'
print ' checkURLs(LinkList urls)'
print ' parseURLs(string html, string url)'
@@ -76,7 +77,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' void restartFile(FileID fid)'
print ' void recheckPackage(PackageID pid)'
print ' void restartFailed()'
- print ' void setFilePaused(FileID fid, bool paused)'
+ print ' void stopDownloads( fids)'
+ print ' void stopAllDownloads()'
print ' void setPackagePaused(PackageID pid, bool paused)'
print ' bool setPackageFolder(PackageID pid, string path)'
print ' void setPackageData(PackageID pid, data)'
@@ -84,9 +86,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' bool moveFiles( fids, PackageID pid)'
print ' void orderPackage( pids, i16 position)'
print ' void orderFiles( fids, PackageID pid, i16 position)'
- print ' getProgressInfo()'
- print ' void stopDownloads( fids)'
- print ' void stopAllDownloads()'
print ' bool isInteractionWaiting(i16 mode)'
print ' InteractionTask getInteractionTask(i16 mode)'
print ' void setInteractionResult(InteractionID iid, JSONString result)'
@@ -234,6 +233,12 @@ elif cmd == 'toggleReconnect':
sys.exit(1)
pp.pprint(client.toggleReconnect())
+elif cmd == 'getProgressInfo':
+ if len(args) != 0:
+ print 'getProgressInfo requires 0 args'
+ sys.exit(1)
+ pp.pprint(client.getProgressInfo())
+
elif cmd == 'getConfig':
if len(args) != 0:
print 'getConfig requires 0 args'
@@ -480,11 +485,17 @@ elif cmd == 'restartFailed':
sys.exit(1)
pp.pprint(client.restartFailed())
-elif cmd == 'setFilePaused':
- if len(args) != 2:
- print 'setFilePaused requires 2 args'
+elif cmd == 'stopDownloads':
+ if len(args) != 1:
+ print 'stopDownloads requires 1 args'
sys.exit(1)
- pp.pprint(client.setFilePaused(eval(args[0]),eval(args[1]),))
+ pp.pprint(client.stopDownloads(eval(args[0]),))
+
+elif cmd == 'stopAllDownloads':
+ if len(args) != 0:
+ print 'stopAllDownloads requires 0 args'
+ sys.exit(1)
+ pp.pprint(client.stopAllDownloads())
elif cmd == 'setPackagePaused':
if len(args) != 2:
@@ -528,24 +539,6 @@ elif cmd == 'orderFiles':
sys.exit(1)
pp.pprint(client.orderFiles(eval(args[0]),eval(args[1]),eval(args[2]),))
-elif cmd == 'getProgressInfo':
- if len(args) != 0:
- print 'getProgressInfo requires 0 args'
- sys.exit(1)
- pp.pprint(client.getProgressInfo())
-
-elif cmd == 'stopDownloads':
- if len(args) != 1:
- print 'stopDownloads requires 1 args'
- sys.exit(1)
- pp.pprint(client.stopDownloads(eval(args[0]),))
-
-elif cmd == 'stopAllDownloads':
- if len(args) != 0:
- print 'stopAllDownloads requires 0 args'
- sys.exit(1)
- pp.pprint(client.stopAllDownloads())
-
elif cmd == 'isInteractionWaiting':
if len(args) != 1:
print 'isInteractionWaiting requires 1 args'
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
index 4134a4d3e..157d5b87b 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
@@ -53,6 +53,9 @@ class Iface(object):
def toggleReconnect(self, ):
pass
+ def getProgressInfo(self, ):
+ pass
+
def getConfig(self, ):
pass
@@ -76,10 +79,10 @@ class Iface(object):
"""
pass
- def deleteConfig(self, config):
+ def deleteConfig(self, plugin):
"""
Parameters:
- - config
+ - plugin
"""
pass
@@ -341,14 +344,16 @@ class Iface(object):
def restartFailed(self, ):
pass
- def setFilePaused(self, fid, paused):
+ def stopDownloads(self, fids):
"""
Parameters:
- - fid
- - paused
+ - fids
"""
pass
+ def stopAllDownloads(self, ):
+ pass
+
def setPackagePaused(self, pid, paused):
"""
Parameters:
@@ -406,19 +411,6 @@ class Iface(object):
"""
pass
- def getProgressInfo(self, ):
- pass
-
- def stopDownloads(self, fids):
- """
- Parameters:
- - fids
- """
- pass
-
- def stopAllDownloads(self, ):
- pass
-
def isInteractionWaiting(self, mode):
"""
Parameters:
@@ -882,6 +874,31 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleReconnect failed: unknown result");
+ def getProgressInfo(self, ):
+ self.send_getProgressInfo()
+ return self.recv_getProgressInfo()
+
+ def send_getProgressInfo(self, ):
+ self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid)
+ args = getProgressInfo_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getProgressInfo(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getProgressInfo_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result");
+
def getConfig(self, ):
self.send_getConfig()
return self.recv_getConfig()
@@ -1015,18 +1032,18 @@ class Client(Iface):
self._iprot.readMessageEnd()
return
- def deleteConfig(self, config):
+ def deleteConfig(self, plugin):
"""
Parameters:
- - config
+ - plugin
"""
- self.send_deleteConfig(config)
+ self.send_deleteConfig(plugin)
self.recv_deleteConfig()
- def send_deleteConfig(self, config):
+ def send_deleteConfig(self, plugin):
self._oprot.writeMessageBegin('deleteConfig', TMessageType.CALL, self._seqid)
args = deleteConfig_args()
- args.config = config
+ args.plugin = plugin
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -2113,36 +2130,55 @@ class Client(Iface):
self._iprot.readMessageEnd()
return
- def setFilePaused(self, fid, paused):
+ def stopDownloads(self, fids):
"""
Parameters:
- - fid
- - paused
+ - fids
"""
- self.send_setFilePaused(fid, paused)
- self.recv_setFilePaused()
+ self.send_stopDownloads(fids)
+ self.recv_stopDownloads()
- def send_setFilePaused(self, fid, paused):
- self._oprot.writeMessageBegin('setFilePaused', TMessageType.CALL, self._seqid)
- args = setFilePaused_args()
- args.fid = fid
- args.paused = paused
+ def send_stopDownloads(self, fids):
+ self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid)
+ args = stopDownloads_args()
+ args.fids = fids
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
- def recv_setFilePaused(self, ):
+ def recv_stopDownloads(self, ):
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(self._iprot)
self._iprot.readMessageEnd()
raise x
- result = setFilePaused_result()
+ result = stopDownloads_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ return
+
+ def stopAllDownloads(self, ):
+ self.send_stopAllDownloads()
+ self.recv_stopAllDownloads()
+
+ def send_stopAllDownloads(self, ):
+ self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid)
+ args = stopAllDownloads_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_stopAllDownloads(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = stopAllDownloads_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
- if result.e is not None:
- raise result.e
return
def setPackagePaused(self, pid, paused):
@@ -2373,82 +2409,6 @@ class Client(Iface):
self._iprot.readMessageEnd()
return
- def getProgressInfo(self, ):
- self.send_getProgressInfo()
- return self.recv_getProgressInfo()
-
- def send_getProgressInfo(self, ):
- self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid)
- args = getProgressInfo_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_getProgressInfo(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = getProgressInfo_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result");
-
- def stopDownloads(self, fids):
- """
- Parameters:
- - fids
- """
- self.send_stopDownloads(fids)
- self.recv_stopDownloads()
-
- def send_stopDownloads(self, fids):
- self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid)
- args = stopDownloads_args()
- args.fids = fids
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_stopDownloads(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = stopDownloads_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- return
-
- def stopAllDownloads(self, ):
- self.send_stopAllDownloads()
- self.recv_stopAllDownloads()
-
- def send_stopAllDownloads(self, ):
- self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid)
- args = stopAllDownloads_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_stopAllDownloads(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = stopAllDownloads_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- return
-
def isInteractionWaiting(self, mode):
"""
Parameters:
@@ -3176,6 +3136,7 @@ class Processor(Iface, TProcessor):
self._processMap["isTimeDownload"] = Processor.process_isTimeDownload
self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect
self._processMap["toggleReconnect"] = Processor.process_toggleReconnect
+ self._processMap["getProgressInfo"] = Processor.process_getProgressInfo
self._processMap["getConfig"] = Processor.process_getConfig
self._processMap["getGlobalPlugins"] = Processor.process_getGlobalPlugins
self._processMap["getUserPlugins"] = Processor.process_getUserPlugins
@@ -3217,7 +3178,8 @@ class Processor(Iface, TProcessor):
self._processMap["restartFile"] = Processor.process_restartFile
self._processMap["recheckPackage"] = Processor.process_recheckPackage
self._processMap["restartFailed"] = Processor.process_restartFailed
- self._processMap["setFilePaused"] = Processor.process_setFilePaused
+ self._processMap["stopDownloads"] = Processor.process_stopDownloads
+ self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads
self._processMap["setPackagePaused"] = Processor.process_setPackagePaused
self._processMap["setPackageFolder"] = Processor.process_setPackageFolder
self._processMap["setPackageData"] = Processor.process_setPackageData
@@ -3225,9 +3187,6 @@ class Processor(Iface, TProcessor):
self._processMap["moveFiles"] = Processor.process_moveFiles
self._processMap["orderPackage"] = Processor.process_orderPackage
self._processMap["orderFiles"] = Processor.process_orderFiles
- self._processMap["getProgressInfo"] = Processor.process_getProgressInfo
- self._processMap["stopDownloads"] = Processor.process_stopDownloads
- self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads
self._processMap["isInteractionWaiting"] = Processor.process_isInteractionWaiting
self._processMap["getInteractionTask"] = Processor.process_getInteractionTask
self._processMap["setInteractionResult"] = Processor.process_setInteractionResult
@@ -3400,6 +3359,17 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_getProgressInfo(self, seqid, iprot, oprot):
+ args = getProgressInfo_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getProgressInfo_result()
+ result.success = self._handler.getProgressInfo()
+ oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_getConfig(self, seqid, iprot, oprot):
args = getConfig_args()
args.read(iprot)
@@ -3460,7 +3430,7 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = deleteConfig_result()
- self._handler.deleteConfig(args.config)
+ self._handler.deleteConfig(args.plugin)
oprot.writeMessageBegin("deleteConfig", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -3863,16 +3833,24 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_setFilePaused(self, seqid, iprot, oprot):
- args = setFilePaused_args()
+ def process_stopDownloads(self, seqid, iprot, oprot):
+ args = stopDownloads_args()
args.read(iprot)
iprot.readMessageEnd()
- result = setFilePaused_result()
- try:
- self._handler.setFilePaused(args.fid, args.paused)
- except FileDoesNotExists, e:
- result.e = e
- oprot.writeMessageBegin("setFilePaused", TMessageType.REPLY, seqid)
+ result = stopDownloads_result()
+ self._handler.stopDownloads(args.fids)
+ oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_stopAllDownloads(self, seqid, iprot, oprot):
+ args = stopAllDownloads_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = stopAllDownloads_result()
+ self._handler.stopAllDownloads()
+ oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
@@ -3969,39 +3947,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getProgressInfo(self, seqid, iprot, oprot):
- args = getProgressInfo_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = getProgressInfo_result()
- result.success = self._handler.getProgressInfo()
- oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_stopDownloads(self, seqid, iprot, oprot):
- args = stopDownloads_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = stopDownloads_result()
- self._handler.stopDownloads(args.fids)
- oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_stopAllDownloads(self, seqid, iprot, oprot):
- args = stopAllDownloads_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = stopAllDownloads_result()
- self._handler.stopAllDownloads()
- oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_isInteractionWaiting(self, seqid, iprot, oprot):
args = isInteractionWaiting_args()
args.read(iprot)
@@ -4577,6 +4522,33 @@ class toggleReconnect_result(TBase):
self.success = success
+class getProgressInfo_args(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
+
+
+class getProgressInfo_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+
class getConfig_args(TBase):
__slots__ = [
@@ -4726,20 +4698,20 @@ class saveConfig_result(TBase):
class deleteConfig_args(TBase):
"""
Attributes:
- - config
+ - plugin
"""
__slots__ = [
- 'config',
+ 'plugin',
]
thrift_spec = (
None, # 0
- (1, TType.STRUCT, 'config', (ConfigHolder, ConfigHolder.thrift_spec), None, ), # 1
+ (1, TType.STRING, 'plugin', None, None, ), # 1
)
- def __init__(self, config=None,):
- self.config = config
+ def __init__(self, plugin=None,):
+ self.plugin = plugin
class deleteConfig_result(TBase):
@@ -6033,46 +6005,50 @@ class restartFailed_result(TBase):
)
-class setFilePaused_args(TBase):
+class stopDownloads_args(TBase):
"""
Attributes:
- - fid
- - paused
+ - fids
"""
__slots__ = [
- 'fid',
- 'paused',
+ 'fids',
]
thrift_spec = (
None, # 0
- (1, TType.I32, 'fid', None, None, ), # 1
- (2, TType.BOOL, 'paused', None, None, ), # 2
+ (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1
)
- def __init__(self, fid=None, paused=None,):
- self.fid = fid
- self.paused = paused
+ def __init__(self, fids=None,):
+ self.fids = fids
-class setFilePaused_result(TBase):
- """
- Attributes:
- - e
- """
+class stopDownloads_result(TBase):
__slots__ = [
- 'e',
]
thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'e', (FileDoesNotExists, FileDoesNotExists.thrift_spec), None, ), # 1
)
- def __init__(self, e=None,):
- self.e = e
+
+class stopAllDownloads_args(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
+
+
+class stopAllDownloads_result(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
class setPackagePaused_args(TBase):
@@ -6362,79 +6338,6 @@ class orderFiles_result(TBase):
)
-class getProgressInfo_args(TBase):
-
- __slots__ = [
- ]
-
- thrift_spec = (
- )
-
-
-class getProgressInfo_result(TBase):
- """
- Attributes:
- - success
- """
-
- __slots__ = [
- 'success',
- ]
-
- thrift_spec = (
- (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0
- )
-
- def __init__(self, success=None,):
- self.success = success
-
-
-class stopDownloads_args(TBase):
- """
- Attributes:
- - fids
- """
-
- __slots__ = [
- 'fids',
- ]
-
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1
- )
-
- def __init__(self, fids=None,):
- self.fids = fids
-
-
-class stopDownloads_result(TBase):
-
- __slots__ = [
- ]
-
- thrift_spec = (
- )
-
-
-class stopAllDownloads_args(TBase):
-
- __slots__ = [
- ]
-
- thrift_spec = (
- )
-
-
-class stopAllDownloads_result(TBase):
-
- __slots__ = [
- ]
-
- thrift_spec = (
- )
-
-
class isInteractionWaiting_args(TBase):
"""
Attributes:
diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
index 815c80819..4b2f6497c 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
@@ -241,83 +241,82 @@ class Role(TBase):
}
-class ProgressInfo(TBase):
+class DownloadProgress(TBase):
"""
Attributes:
- fid
- - name
+ - pid
- speed
- - eta
- - format_eta
- - bleft
- - size
- - format_size
- - percent
- status
- - statusmsg
- - format_wait
- - wait_until
- - packageID
- - packageName
- - plugin
"""
__slots__ = [
'fid',
- 'name',
+ 'pid',
'speed',
- 'eta',
- 'format_eta',
- 'bleft',
- 'size',
- 'format_size',
- 'percent',
'status',
- 'statusmsg',
- 'format_wait',
- 'wait_until',
- 'packageID',
- 'packageName',
- 'plugin',
]
thrift_spec = (
None, # 0
(1, TType.I32, 'fid', None, None, ), # 1
- (2, TType.STRING, 'name', None, None, ), # 2
+ (2, TType.I32, 'pid', None, None, ), # 2
(3, TType.I64, 'speed', None, None, ), # 3
+ (4, TType.I32, 'status', None, None, ), # 4
+ )
+
+ def __init__(self, fid=None, pid=None, speed=None, status=None,):
+ self.fid = fid
+ self.pid = pid
+ self.speed = speed
+ self.status = status
+
+
+class ProgressInfo(TBase):
+ """
+ Attributes:
+ - plugin
+ - name
+ - statusmsg
+ - eta
+ - format_eta
+ - done
+ - total
+ - download
+ """
+
+ __slots__ = [
+ 'plugin',
+ 'name',
+ 'statusmsg',
+ 'eta',
+ 'format_eta',
+ 'done',
+ 'total',
+ 'download',
+ ]
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'plugin', None, None, ), # 1
+ (2, TType.STRING, 'name', None, None, ), # 2
+ (3, TType.STRING, 'statusmsg', None, None, ), # 3
(4, TType.I32, 'eta', None, None, ), # 4
(5, TType.STRING, 'format_eta', None, None, ), # 5
- (6, TType.I64, 'bleft', None, None, ), # 6
- (7, TType.I64, 'size', None, None, ), # 7
- (8, TType.STRING, 'format_size', None, None, ), # 8
- (9, TType.I16, 'percent', None, None, ), # 9
- (10, TType.I32, 'status', None, None, ), # 10
- (11, TType.STRING, 'statusmsg', None, None, ), # 11
- (12, TType.STRING, 'format_wait', None, None, ), # 12
- (13, TType.I64, 'wait_until', None, None, ), # 13
- (14, TType.I32, 'packageID', None, None, ), # 14
- (15, TType.STRING, 'packageName', None, None, ), # 15
- (16, TType.STRING, 'plugin', None, None, ), # 16
+ (6, TType.I64, 'done', None, None, ), # 6
+ (7, TType.I64, 'total', None, None, ), # 7
+ (8, TType.STRUCT, 'download', (DownloadProgress, DownloadProgress.thrift_spec), None, ), # 8
)
- def __init__(self, fid=None, name=None, speed=None, eta=None, format_eta=None, bleft=None, size=None, format_size=None, percent=None, status=None, statusmsg=None, format_wait=None, wait_until=None, packageID=None, packageName=None, plugin=None,):
- self.fid = fid
+ def __init__(self, plugin=None, name=None, statusmsg=None, eta=None, format_eta=None, done=None, total=None, download=None,):
+ self.plugin = plugin
self.name = name
- self.speed = speed
+ self.statusmsg = statusmsg
self.eta = eta
self.format_eta = format_eta
- self.bleft = bleft
- self.size = size
- self.format_size = format_size
- self.percent = percent
- self.status = status
- self.statusmsg = statusmsg
- self.format_wait = format_wait
- self.wait_until = wait_until
- self.packageID = packageID
- self.packageName = packageName
- self.plugin = plugin
+ self.done = done
+ self.total = total
+ self.download = download
class ServerStatus(TBase):