diff options
| author | 2013-11-25 22:57:33 +0100 | |
|---|---|---|
| committer | 2013-11-25 22:57:33 +0100 | |
| commit | 10bd0793f4dc0191d97da390a43552a272c8290e (patch) | |
| tree | 87b62f81e62b630a89e80beabdec5dd54a359338 /pyload/remote | |
| parent | render addon menu for packages (diff) | |
| download | pyload-10bd0793f4dc0191d97da390a43552a272c8290e.tar.xz | |
invoke addons via context menu
Diffstat (limited to 'pyload/remote')
| -rw-r--r-- | pyload/remote/apitypes.py | 16 | ||||
| -rw-r--r-- | pyload/remote/apitypes_debug.py | 12 | ||||
| -rw-r--r-- | pyload/remote/pyload.thrift | 32 | 
3 files changed, 30 insertions, 30 deletions
diff --git a/pyload/remote/apitypes.py b/pyload/remote/apitypes.py index 6a7d2f063..decfbb8b3 100644 --- a/pyload/remote/apitypes.py +++ b/pyload/remote/apitypes.py @@ -194,7 +194,7 @@ class EventInfo(BaseObject):  		self.eventname = eventname  		self.event_args = event_args -class FileDoesNotExists(ExceptionObject): +class FileDoesNotExist(ExceptionObject):  	__slots__ = ['fid']  	def __init__(self, fid=None): @@ -261,7 +261,7 @@ class OnlineCheck(BaseObject):  		self.rid = rid  		self.data = data -class PackageDoesNotExists(ExceptionObject): +class PackageDoesNotExist(ExceptionObject):  	__slots__ = ['pid']  	def __init__(self, pid=None): @@ -323,7 +323,7 @@ class ServerStatus(BaseObject):  		self.download = download  		self.reconnect = reconnect -class ServiceDoesNotExists(ExceptionObject): +class ServiceDoesNotExist(ExceptionObject):  	__slots__ = ['plugin', 'func']  	def __init__(self, plugin=None, func=None): @@ -364,7 +364,7 @@ class UserData(BaseObject):  		self.user = user  		self.templateName = templateName -class UserDoesNotExists(ExceptionObject): +class UserDoesNotExist(ExceptionObject):  	__slots__ = ['user']  	def __init__(self, user=None): @@ -383,10 +383,6 @@ class Iface(object):  		pass  	def addUser(self, username, password):  		pass -	def callAddon(self, plugin, func, arguments): -		pass -	def callAddonHandler(self, plugin, func, pid_or_fid): -		pass  	def checkContainer(self, filename, data):  		pass  	def checkHTML(self, html, url): @@ -463,6 +459,10 @@ class Iface(object):  		pass  	def getWSAddress(self):  		pass +	def invokeAddon(self, plugin, func, func_args): +		pass +	def invokeAddonHandler(self, plugin, func, pid_or_fid): +		pass  	def isInteractionWaiting(self, mode):  		pass  	def loadConfig(self, name): diff --git a/pyload/remote/apitypes_debug.py b/pyload/remote/apitypes_debug.py index 14b0cc98e..7c19235c2 100644 --- a/pyload/remote/apitypes_debug.py +++ b/pyload/remote/apitypes_debug.py @@ -27,23 +27,23 @@ classes = {  	'DownloadInfo' : [basestring, basestring, basestring, int, basestring, basestring],  	'DownloadProgress' : [int, int, int, int],  	'EventInfo' : [basestring, (list, basestring)], -	'FileDoesNotExists' : [int], +	'FileDoesNotExist' : [int],  	'FileInfo' : [int, basestring, int, int, int, int, int, int, int, (None, DownloadInfo)],  	'Input' : [int, (None, basestring), (None, basestring)],  	'InteractionTask' : [int, int, Input, basestring, basestring, basestring],  	'InvalidConfigSection' : [basestring],  	'LinkStatus' : [basestring, basestring, int, int, (None, basestring), (None, basestring)],  	'OnlineCheck' : [int, (dict, basestring, LinkStatus)], -	'PackageDoesNotExists' : [int], +	'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)],  	'ServerStatus' : [int, int, int, int, int, bool, bool, bool, bool], -	'ServiceDoesNotExists' : [basestring, basestring], +	'ServiceDoesNotExist' : [basestring, basestring],  	'ServiceException' : [basestring],  	'TreeCollection' : [PackageInfo, (dict, int, FileInfo), (dict, int, PackageInfo)],  	'UserData' : [int, basestring, basestring, int, int, basestring, int, int, basestring, int, int, basestring], -	'UserDoesNotExists' : [basestring], +	'UserDoesNotExist' : [basestring],  }  methods = { @@ -53,8 +53,6 @@ methods = {  	'addPackageChild': int,  	'addPackageP': int,  	'addUser': UserData, -	'callAddon': basestring, -	'callAddonHandler': basestring,  	'checkContainer': OnlineCheck,  	'checkHTML': OnlineCheck,  	'checkLinks': OnlineCheck, @@ -93,6 +91,8 @@ methods = {  	'getServerVersion': basestring,  	'getUserData': UserData,  	'getWSAddress': basestring, +	'invokeAddon': basestring, +	'invokeAddonHandler': basestring,  	'isInteractionWaiting': bool,  	'loadConfig': ConfigHolder,  	'login': bool, diff --git a/pyload/remote/pyload.thrift b/pyload/remote/pyload.thrift index 07782ef42..da00bc680 100644 --- a/pyload/remote/pyload.thrift +++ b/pyload/remote/pyload.thrift @@ -306,19 +306,19 @@ struct OnlineCheck {  // exceptions -exception PackageDoesNotExists { +exception PackageDoesNotExist {    1: PackageID pid  } -exception FileDoesNotExists { +exception FileDoesNotExist {    1: FileID fid  } -exception UserDoesNotExists { +exception UserDoesNotExist {    1: string user  } -exception ServiceDoesNotExists { +exception ServiceDoesNotExist {    1: string plugin    2: string func  } @@ -414,8 +414,8 @@ service Pyload {    PackageID uploadContainer(1: string filename, 2: binary data), -  void addLinks(1: PackageID pid, 2: LinkList links) throws (1: PackageDoesNotExists e), -  void addLocalFile(1: PackageID pid, 2: string name, 3: string path) throws (1: PackageDoesNotExists e) +  void addLinks(1: PackageID pid, 2: LinkList links) throws (1: PackageDoesNotExist e), +  void addLocalFile(1: PackageID pid, 2: string name, 3: string path) throws (1: PackageDoesNotExist e)    // these are real file operations and WILL delete files on disk    void deleteFiles(1: list<FileID> fids), @@ -444,8 +444,8 @@ service Pyload {    // same as above with full=False    TreeCollection getPackageContent(1: PackageID pid), -  PackageInfo getPackageInfo(1: PackageID pid) throws (1: PackageDoesNotExists e), -  FileInfo getFileInfo(1: FileID fid) throws (1: FileDoesNotExists e), +  PackageInfo getPackageInfo(1: PackageID pid) throws (1: PackageDoesNotExist e), +  FileInfo getFileInfo(1: FileID fid) throws (1: FileDoesNotExist e),    TreeCollection findFiles(1: string pattern),    TreeCollection findPackages(1: list<string> tags), @@ -454,12 +454,12 @@ service Pyload {    // Modify Files/Packages    // moving package while downloading is not possible, so they will return bool to indicate success -  void updatePackage(1: PackageInfo pack) throws (1: PackageDoesNotExists e), -  bool setPackageFolder(1: PackageID pid, 2: string path) throws (1: PackageDoesNotExists e), +  void updatePackage(1: PackageInfo pack) throws (1: PackageDoesNotExist e), +  bool setPackageFolder(1: PackageID pid, 2: string path) throws (1: PackageDoesNotExist e),    // as above, this will move files on disk -  bool movePackage(1: PackageID pid, 2: PackageID root) throws (1: PackageDoesNotExists e), -  bool moveFiles(1: list<FileID> fids, 2: PackageID pid) throws (1: PackageDoesNotExists e), +  bool movePackage(1: PackageID pid, 2: PackageID root) throws (1: PackageDoesNotExist e), +  bool moveFiles(1: list<FileID> fids, 2: PackageID pid) throws (1: PackageDoesNotExist e),    void orderPackage(1: list<PackageID> pids, 2: i16 position),    void orderFiles(1: list<FileID> fids, 2: PackageID pid, 3: i16 position), @@ -518,12 +518,12 @@ service Pyload {    map<PluginName, list<AddonService>> getAddonHandler(), -  JSONString callAddon(1: PluginName plugin, 2: string func, 3: list<JSONString> arguments) -        throws (1: ServiceDoesNotExists e, 2: ServiceException ex), +  JSONString invokeAddon(1: PluginName plugin, 2: string func, 3: list<JSONString> func_args) +        throws (1: ServiceDoesNotExist e, 2: ServiceException ex),    // special variant of callAddon that works on the media types, acccepting integer -  JSONString callAddonHandler(1: PluginName plugin, 2: string func, 3: PackageID pid_or_fid) -        throws (1: ServiceDoesNotExists e, 2: ServiceException ex), +  JSONString invokeAddonHandler(1: PluginName plugin, 2: string func, 3: PackageID pid_or_fid) +        throws (1: ServiceDoesNotExist e, 2: ServiceException ex),    //scheduler  | 
