summaryrefslogtreecommitdiffstats
path: root/module/remote
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-29 20:35:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-29 20:35:22 +0200
commit628d3f1db423690c8f0076036e79ca536c897d3d (patch)
tree6d308951e4f3c867fd24f1fd7d94ef543d03bd23 /module/remote
parentfix #349 add captcha support (diff)
downloadpyload-628d3f1db423690c8f0076036e79ca536c897d3d.tar.xz
little thrift fixes, some new methods stubs
Diffstat (limited to 'module/remote')
-rw-r--r--module/remote/thriftbackend/Handler.py6
-rw-r--r--module/remote/thriftbackend/pyload.thrift52
-rwxr-xr-xmodule/remote/thriftbackend/thriftgen/pyload/Pyload-remote57
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/Pyload.py529
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/ttypes.py60
5 files changed, 599 insertions, 105 deletions
diff --git a/module/remote/thriftbackend/Handler.py b/module/remote/thriftbackend/Handler.py
index e45cdfcaa..d518c6e88 100644
--- a/module/remote/thriftbackend/Handler.py
+++ b/module/remote/thriftbackend/Handler.py
@@ -147,7 +147,6 @@ class Handler(Iface):
status.speed = pyfile.getSpeed() #bytes
status.eta = pyfile.getETA()
status.format_eta = pyfile.formatETA()
- status.kbleft = pyfile.getBytesLeft() #holded for backward comp.
status.bleft = pyfile.getBytesLeft()
status.size = pyfile.getSize()
status.format_size = pyfile.formatSize()
@@ -156,8 +155,9 @@ class Handler(Iface):
status.statusmsg = pyfile.m.statusMsg[pyfile.status]
status.format_wait = pyfile.formatWait()
status.wait_until = pyfile.waitUntil
- status.package = pyfile.package().name
+ status.packageName = pyfile.package().name
status.packageID = pyfile.package().id
+ status.plugin = pyfile.pluginname
data.append(status)
return data
@@ -543,7 +543,7 @@ class Handler(Iface):
def getServices(self):
data = {}
for plugin, funcs in self.core.hookManager.methods.iteritems():
- data[plugin] = ServiceInfo(funcs)
+ data[plugin] = funcs
return data
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index 52fa1f08d..1a3c2d4e5 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -3,7 +3,9 @@ namespace java org.pyload.thrift
typedef i32 FileID
typedef i32 PackageID
typedef i32 TaskID
+typedef i32 ResultID
typedef list<string> LinkList
+typedef string PluginName
typedef byte Progress
typedef byte Priority
@@ -51,6 +53,8 @@ struct DownloadInfo {
12: string format_wait,
13: i64 wait_until,
14: PackageID packageID,
+ 15: string packageName,
+ 16: PluginName plugin,
}
struct ServerStatus {
@@ -80,7 +84,7 @@ struct FileData {
1: FileID fid,
2: string url,
3: string name,
- 4: string plugin,
+ 4: PluginName plugin,
5: i64 size,
6: string format_size,
7: DownloadStatus status,
@@ -149,23 +153,29 @@ struct AccountInfo {
}
struct AccountData {
- 1: string type,
+ 1: PluginName type,
2: string login,
3: optional string password,
4: optional map<string, string> options
}
-struct ServiceInfo {
- 1: map <string, string> funcs
-}
struct ServiceCall {
- 1: string plugin,
+ 1: PluginName plugin,
2: string func,
3: optional list<string> arguments,
4: optional bool parseArguments, //default False
}
+struct OnlineStatus {
+ 1: string url,
+ 2: string name,
+ 3: DownloadStatus status,
+ 4: i64 size, // size <= 0 : unknown
+}
+
+// exceptions
+
exception PackageDoesNotExists{
1: PackageID pid
}
@@ -184,11 +194,14 @@ exception ServiceException{
}
service Pyload {
- //general
+
+ //config
string getConfigValue(1: string category, 2: string option, 3: string section),
void setConfigValue(1: string category, 2: string option, 3: string value, 4: string section),
list<ConfigSection> getConfig(),
list<ConfigSection> getPluginConfig(),
+
+ // server status
void pauseServer(),
void unpauseServer(),
bool togglePause(),
@@ -198,11 +211,16 @@ service Pyload {
void kill(),
void restart(),
list<string> getLog(1: i32 offset),
- map<string, string> checkURL(1: LinkList urls),
bool isTimeDownload(),
bool isTimeReconnect(),
bool toggleReconnect(),
-
+
+ // download preparing
+ map<PluginName, LinkList> checkURLs(1: LinkList urls),
+ map<PluginName, LinkList> parseURLs(1: string html),
+ ResultID checkOnlineStatus(1: LinkList urls),
+ map<PluginName, list<OnlineStatus>> pollResults(1: ResultID rid),
+
//downloads
list<DownloadInfo> statusDownloads(),
PackageID addPackage(1: string name, 2: LinkList links, 3: Destination dest),
@@ -247,15 +265,25 @@ service Pyload {
list<AccountInfo> getAccounts(1: bool refresh),
list<string> getAccountTypes()
void updateAccounts(1: AccountData data),
- void removeAccount(1: string plugin, 2: string account),
+ void removeAccount(1: PluginName plugin, 2: string account),
//auth
bool login(1: string username, 2: string password),
UserData getUserData(1: string username, 2:string password),
//services
- map<string, ServiceInfo> getServices(),
- bool hasService(1: string plugin, 2: string func),
+
+ // servicename : description
+ map<PluginName, map<string, string>> getServices(),
+ bool hasService(1: PluginName plugin, 2: string func),
string call(1: ServiceCall info) throws (1: ServiceDoesNotExists ex, 2: ServiceException e),
+
+ //info
+ // {plugin: {name: value}}
+ map<PluginName, map<string,string>> getAllInfo(),
+ map<string, string> getInfoByPlugin(1: string plugin)
+
+ //scheduler
+
}
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
index 88b14bd1d..5feb243ef 100755
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
@@ -36,10 +36,13 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' void kill()'
print ' void restart()'
print ' getLog(i32 offset)'
- print ' checkURL(LinkList urls)'
print ' bool isTimeDownload()'
print ' bool isTimeReconnect()'
print ' bool toggleReconnect()'
+ print ' checkURLs(LinkList urls)'
+ print ' parseURLs(string html)'
+ print ' ResultID checkOnlineStatus(LinkList urls)'
+ print ' pollResults(ResultID rid)'
print ' statusDownloads()'
print ' PackageID addPackage(string name, LinkList links, Destination dest)'
print ' PackageData getPackageData(PackageID pid)'
@@ -77,12 +80,14 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' getAccounts(bool refresh)'
print ' getAccountTypes()'
print ' void updateAccounts(AccountData data)'
- print ' void removeAccount(string plugin, string account)'
+ print ' void removeAccount(PluginName plugin, string account)'
print ' bool login(string username, string password)'
print ' UserData getUserData(string username, string password)'
print ' getServices()'
- print ' bool hasService(string plugin, string func)'
+ print ' bool hasService(PluginName plugin, string func)'
print ' string call(ServiceCall info)'
+ print ' getAllInfo()'
+ print ' getInfoByPlugin(string plugin)'
print ''
sys.exit(0)
@@ -211,12 +216,6 @@ elif cmd == 'getLog':
sys.exit(1)
pp.pprint(client.getLog(eval(args[0]),))
-elif cmd == 'checkURL':
- if len(args) != 1:
- print 'checkURL requires 1 args'
- sys.exit(1)
- pp.pprint(client.checkURL(eval(args[0]),))
-
elif cmd == 'isTimeDownload':
if len(args) != 0:
print 'isTimeDownload requires 0 args'
@@ -235,6 +234,30 @@ elif cmd == 'toggleReconnect':
sys.exit(1)
pp.pprint(client.toggleReconnect())
+elif cmd == 'checkURLs':
+ if len(args) != 1:
+ print 'checkURLs requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.checkURLs(eval(args[0]),))
+
+elif cmd == 'parseURLs':
+ if len(args) != 1:
+ print 'parseURLs requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.parseURLs(args[0],))
+
+elif cmd == 'checkOnlineStatus':
+ if len(args) != 1:
+ print 'checkOnlineStatus requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.checkOnlineStatus(eval(args[0]),))
+
+elif cmd == 'pollResults':
+ if len(args) != 1:
+ print 'pollResults requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.pollResults(eval(args[0]),))
+
elif cmd == 'statusDownloads':
if len(args) != 0:
print 'statusDownloads requires 0 args'
@@ -461,7 +484,7 @@ elif cmd == 'removeAccount':
if len(args) != 2:
print 'removeAccount requires 2 args'
sys.exit(1)
- pp.pprint(client.removeAccount(args[0],args[1],))
+ pp.pprint(client.removeAccount(eval(args[0]),args[1],))
elif cmd == 'login':
if len(args) != 2:
@@ -485,7 +508,7 @@ elif cmd == 'hasService':
if len(args) != 2:
print 'hasService requires 2 args'
sys.exit(1)
- pp.pprint(client.hasService(args[0],args[1],))
+ pp.pprint(client.hasService(eval(args[0]),args[1],))
elif cmd == 'call':
if len(args) != 1:
@@ -493,6 +516,18 @@ elif cmd == 'call':
sys.exit(1)
pp.pprint(client.call(eval(args[0]),))
+elif cmd == 'getAllInfo':
+ if len(args) != 0:
+ print 'getAllInfo requires 0 args'
+ sys.exit(1)
+ pp.pprint(client.getAllInfo())
+
+elif cmd == 'getInfoByPlugin':
+ if len(args) != 1:
+ print 'getInfoByPlugin requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.getInfoByPlugin(args[0],))
+
else:
print 'Unrecognized method %s' % cmd
sys.exit(1)
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
index 7dbe7874e..187b7fa74 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
@@ -69,20 +69,41 @@ class Iface(object):
"""
pass
- def checkURL(self, urls):
+ def isTimeDownload(self, ):
+ pass
+
+ def isTimeReconnect(self, ):
+ pass
+
+ def toggleReconnect(self, ):
+ pass
+
+ def checkURLs(self, urls):
"""
Parameters:
- urls
"""
pass
- def isTimeDownload(self, ):
+ def parseURLs(self, html):
+ """
+ Parameters:
+ - html
+ """
pass
- def isTimeReconnect(self, ):
+ def checkOnlineStatus(self, urls):
+ """
+ Parameters:
+ - urls
+ """
pass
- def toggleReconnect(self, ):
+ def pollResults(self, rid):
+ """
+ Parameters:
+ - rid
+ """
pass
def statusDownloads(self, ):
@@ -357,6 +378,16 @@ class Iface(object):
"""
pass
+ def getAllInfo(self, ):
+ pass
+
+ def getInfoByPlugin(self, plugin):
+ """
+ Parameters:
+ - plugin
+ """
+ pass
+
class Client(Iface):
def __init__(self, iprot, oprot=None):
@@ -705,36 +736,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "getLog failed: unknown result");
- def checkURL(self, urls):
- """
- Parameters:
- - urls
- """
- self.send_checkURL(urls)
- return self.recv_checkURL()
-
- def send_checkURL(self, urls):
- self._oprot.writeMessageBegin('checkURL', TMessageType.CALL, self._seqid)
- args = checkURL_args()
- args.urls = urls
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_checkURL(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = checkURL_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "checkURL failed: unknown result");
-
def isTimeDownload(self, ):
self.send_isTimeDownload()
return self.recv_isTimeDownload()
@@ -810,6 +811,126 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleReconnect failed: unknown result");
+ def checkURLs(self, urls):
+ """
+ Parameters:
+ - urls
+ """
+ self.send_checkURLs(urls)
+ return self.recv_checkURLs()
+
+ def send_checkURLs(self, urls):
+ self._oprot.writeMessageBegin('checkURLs', TMessageType.CALL, self._seqid)
+ args = checkURLs_args()
+ args.urls = urls
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_checkURLs(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = checkURLs_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "checkURLs failed: unknown result");
+
+ def parseURLs(self, html):
+ """
+ Parameters:
+ - html
+ """
+ self.send_parseURLs(html)
+ return self.recv_parseURLs()
+
+ def send_parseURLs(self, html):
+ self._oprot.writeMessageBegin('parseURLs', TMessageType.CALL, self._seqid)
+ args = parseURLs_args()
+ args.html = html
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_parseURLs(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = parseURLs_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "parseURLs failed: unknown result");
+
+ def checkOnlineStatus(self, urls):
+ """
+ Parameters:
+ - urls
+ """
+ self.send_checkOnlineStatus(urls)
+ return self.recv_checkOnlineStatus()
+
+ def send_checkOnlineStatus(self, urls):
+ self._oprot.writeMessageBegin('checkOnlineStatus', TMessageType.CALL, self._seqid)
+ args = checkOnlineStatus_args()
+ args.urls = urls
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_checkOnlineStatus(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = checkOnlineStatus_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatus failed: unknown result");
+
+ def pollResults(self, rid):
+ """
+ Parameters:
+ - rid
+ """
+ self.send_pollResults(rid)
+ return self.recv_pollResults()
+
+ def send_pollResults(self, rid):
+ self._oprot.writeMessageBegin('pollResults', TMessageType.CALL, self._seqid)
+ args = pollResults_args()
+ args.rid = rid
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_pollResults(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = pollResults_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "pollResults failed: unknown result");
+
def statusDownloads(self, ):
self.send_statusDownloads()
return self.recv_statusDownloads()
@@ -2039,6 +2160,61 @@ class Client(Iface):
raise result.e
raise TApplicationException(TApplicationException.MISSING_RESULT, "call failed: unknown result");
+ def getAllInfo(self, ):
+ self.send_getAllInfo()
+ return self.recv_getAllInfo()
+
+ def send_getAllInfo(self, ):
+ self._oprot.writeMessageBegin('getAllInfo', TMessageType.CALL, self._seqid)
+ args = getAllInfo_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getAllInfo(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getAllInfo_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInfo failed: unknown result");
+
+ def getInfoByPlugin(self, plugin):
+ """
+ Parameters:
+ - plugin
+ """
+ self.send_getInfoByPlugin(plugin)
+ return self.recv_getInfoByPlugin()
+
+ def send_getInfoByPlugin(self, plugin):
+ self._oprot.writeMessageBegin('getInfoByPlugin', TMessageType.CALL, self._seqid)
+ args = getInfoByPlugin_args()
+ args.plugin = plugin
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getInfoByPlugin(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getInfoByPlugin_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getInfoByPlugin failed: unknown result");
+
class Processor(Iface, TProcessor):
def __init__(self, handler):
@@ -2057,10 +2233,13 @@ class Processor(Iface, TProcessor):
self._processMap["kill"] = Processor.process_kill
self._processMap["restart"] = Processor.process_restart
self._processMap["getLog"] = Processor.process_getLog
- self._processMap["checkURL"] = Processor.process_checkURL
self._processMap["isTimeDownload"] = Processor.process_isTimeDownload
self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect
self._processMap["toggleReconnect"] = Processor.process_toggleReconnect
+ self._processMap["checkURLs"] = Processor.process_checkURLs
+ self._processMap["parseURLs"] = Processor.process_parseURLs
+ self._processMap["checkOnlineStatus"] = Processor.process_checkOnlineStatus
+ self._processMap["pollResults"] = Processor.process_pollResults
self._processMap["statusDownloads"] = Processor.process_statusDownloads
self._processMap["addPackage"] = Processor.process_addPackage
self._processMap["getPackageData"] = Processor.process_getPackageData
@@ -2104,6 +2283,8 @@ class Processor(Iface, TProcessor):
self._processMap["getServices"] = Processor.process_getServices
self._processMap["hasService"] = Processor.process_hasService
self._processMap["call"] = Processor.process_call
+ self._processMap["getAllInfo"] = Processor.process_getAllInfo
+ self._processMap["getInfoByPlugin"] = Processor.process_getInfoByPlugin
def process(self, iprot, oprot):
(name, type, seqid) = iprot.readMessageBegin()
@@ -2263,17 +2444,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_checkURL(self, seqid, iprot, oprot):
- args = checkURL_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = checkURL_result()
- result.success = self._handler.checkURL(args.urls)
- oprot.writeMessageBegin("checkURL", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_isTimeDownload(self, seqid, iprot, oprot):
args = isTimeDownload_args()
args.read(iprot)
@@ -2307,6 +2477,50 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_checkURLs(self, seqid, iprot, oprot):
+ args = checkURLs_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = checkURLs_result()
+ result.success = self._handler.checkURLs(args.urls)
+ oprot.writeMessageBegin("checkURLs", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_parseURLs(self, seqid, iprot, oprot):
+ args = parseURLs_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = parseURLs_result()
+ result.success = self._handler.parseURLs(args.html)
+ oprot.writeMessageBegin("parseURLs", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_checkOnlineStatus(self, seqid, iprot, oprot):
+ args = checkOnlineStatus_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = checkOnlineStatus_result()
+ result.success = self._handler.checkOnlineStatus(args.urls)
+ oprot.writeMessageBegin("checkOnlineStatus", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_pollResults(self, seqid, iprot, oprot):
+ args = pollResults_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = pollResults_result()
+ result.success = self._handler.pollResults(args.rid)
+ oprot.writeMessageBegin("pollResults", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_statusDownloads(self, seqid, iprot, oprot):
args = statusDownloads_args()
args.read(iprot)
@@ -2791,6 +3005,28 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_getAllInfo(self, seqid, iprot, oprot):
+ args = getAllInfo_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getAllInfo_result()
+ result.success = self._handler.getAllInfo()
+ oprot.writeMessageBegin("getAllInfo", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getInfoByPlugin(self, seqid, iprot, oprot):
+ args = getInfoByPlugin_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getInfoByPlugin_result()
+ result.success = self._handler.getInfoByPlugin(args.plugin)
+ oprot.writeMessageBegin("getInfoByPlugin", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
# HELPER FUNCTIONS AND STRUCTURES
@@ -3150,7 +3386,88 @@ class getLog_result(TBase):
self.success = success
-class checkURL_args(TBase):
+class isTimeDownload_args(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
+
+
+class isTimeDownload_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.BOOL, 'success', None, None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+
+class isTimeReconnect_args(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
+
+
+class isTimeReconnect_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.BOOL, 'success', None, None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+
+class toggleReconnect_args(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
+
+
+class toggleReconnect_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.BOOL, 'success', None, None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+
+class checkURLs_args(TBase):
"""
Attributes:
- urls
@@ -3169,7 +3486,7 @@ class checkURL_args(TBase):
self.urls = urls
-class checkURL_result(TBase):
+class checkURLs_result(TBase):
"""
Attributes:
- success
@@ -3180,23 +3497,33 @@ class checkURL_result(TBase):
]
thrift_spec = (
- (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
+ (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0
)
def __init__(self, success=None,):
self.success = success
-class isTimeDownload_args(TBase):
+class parseURLs_args(TBase):
+ """
+ Attributes:
+ - html
+ """
__slots__ = [
+ 'html',
]
thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'html', None, None, ), # 1
)
+ def __init__(self, html=None,):
+ self.html = html
-class isTimeDownload_result(TBase):
+
+class parseURLs_result(TBase):
"""
Attributes:
- success
@@ -3207,23 +3534,33 @@ class isTimeDownload_result(TBase):
]
thrift_spec = (
- (0, TType.BOOL, 'success', None, None, ), # 0
+ (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0
)
def __init__(self, success=None,):
self.success = success
-class isTimeReconnect_args(TBase):
+class checkOnlineStatus_args(TBase):
+ """
+ Attributes:
+ - urls
+ """
__slots__ = [
+ 'urls',
]
thrift_spec = (
+ None, # 0
+ (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1
)
+ def __init__(self, urls=None,):
+ self.urls = urls
+
-class isTimeReconnect_result(TBase):
+class checkOnlineStatus_result(TBase):
"""
Attributes:
- success
@@ -3234,23 +3571,33 @@ class isTimeReconnect_result(TBase):
]
thrift_spec = (
- (0, TType.BOOL, 'success', None, None, ), # 0
+ (0, TType.I32, 'success', None, None, ), # 0
)
def __init__(self, success=None,):
self.success = success
-class toggleReconnect_args(TBase):
+class pollResults_args(TBase):
+ """
+ Attributes:
+ - rid
+ """
__slots__ = [
+ 'rid',
]
thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'rid', None, None, ), # 1
)
+ def __init__(self, rid=None,):
+ self.rid = rid
-class toggleReconnect_result(TBase):
+
+class pollResults_result(TBase):
"""
Attributes:
- success
@@ -3261,7 +3608,7 @@ class toggleReconnect_result(TBase):
]
thrift_spec = (
- (0, TType.BOOL, 'success', None, None, ), # 0
+ (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(OnlineStatus, OnlineStatus.thrift_spec))), None, ), # 0
)
def __init__(self, success=None,):
@@ -4534,7 +4881,7 @@ class getServices_result(TBase):
]
thrift_spec = (
- (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(ServiceInfo, ServiceInfo.thrift_spec)), None, ), # 0
+ (0, TType.MAP, 'success', (TType.STRING,None,TType.MAP,(TType.STRING,None,TType.STRING,None)), None, ), # 0
)
def __init__(self, success=None,):
@@ -4626,3 +4973,67 @@ class call_result(TBase):
self.ex = ex
self.e = e
+
+class getAllInfo_args(TBase):
+
+ __slots__ = [
+ ]
+
+ thrift_spec = (
+ )
+
+
+class getAllInfo_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.MAP, 'success', (TType.STRING,None,TType.MAP,(TType.STRING,None,TType.STRING,None)), None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+
+class getInfoByPlugin_args(TBase):
+ """
+ Attributes:
+ - plugin
+ """
+
+ __slots__ = [
+ 'plugin',
+ ]
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'plugin', None, None, ), # 1
+ )
+
+ def __init__(self, plugin=None,):
+ self.plugin = plugin
+
+
+class getInfoByPlugin_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
index d91aaaa33..0b456cc55 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
@@ -110,6 +110,8 @@ class DownloadInfo(TBase):
- format_wait
- wait_until
- packageID
+ - packageName
+ - plugin
"""
__slots__ = [
@@ -127,6 +129,8 @@ class DownloadInfo(TBase):
'format_wait',
'wait_until',
'packageID',
+ 'packageName',
+ 'plugin',
]
thrift_spec = (
@@ -145,9 +149,11 @@ class DownloadInfo(TBase):
(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
)
- 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,):
+ 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
self.name = name
self.speed = speed
@@ -162,6 +168,8 @@ class DownloadInfo(TBase):
self.format_wait = format_wait
self.wait_until = wait_until
self.packageID = packageID
+ self.packageName = packageName
+ self.plugin = plugin
class ServerStatus(TBase):
@@ -605,25 +613,6 @@ class AccountData(TBase):
self.options = options
-class ServiceInfo(TBase):
- """
- Attributes:
- - funcs
- """
-
- __slots__ = [
- 'funcs',
- ]
-
- thrift_spec = (
- None, # 0
- (1, TType.MAP, 'funcs', (TType.STRING,None,TType.STRING,None), None, ), # 1
- )
-
- def __init__(self, funcs=None,):
- self.funcs = funcs
-
-
class ServiceCall(TBase):
"""
Attributes:
@@ -655,6 +644,37 @@ class ServiceCall(TBase):
self.parseArguments = parseArguments
+class OnlineStatus(TBase):
+ """
+ Attributes:
+ - url
+ - name
+ - status
+ - size
+ """
+
+ __slots__ = [
+ 'url',
+ 'name',
+ 'status',
+ 'size',
+ ]
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'url', None, None, ), # 1
+ (2, TType.STRING, 'name', None, None, ), # 2
+ (3, TType.I32, 'status', None, None, ), # 3
+ (4, TType.I64, 'size', None, None, ), # 4
+ )
+
+ def __init__(self, url=None, name=None, status=None, size=None,):
+ self.url = url
+ self.name = name
+ self.status = status
+ self.size = size
+
+
class PackageDoesNotExists(TExceptionBase):
"""
Attributes: