diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-20 12:00:22 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-20 12:00:22 +0100 |
commit | 1e1b64539144006c59c7b705700fc7f34c7a26b1 (patch) | |
tree | ebae99f037953469d4437331763c0c38d41e9511 /module/remote | |
parent | integrated new package view (diff) | |
download | pyload-1e1b64539144006c59c7b705700fc7f34c7a26b1.tar.xz |
more animation for dashboard
Diffstat (limited to 'module/remote')
-rw-r--r-- | module/remote/pyload.thrift | 10 | ||||
-rw-r--r-- | module/remote/ttypes.py | 29 | ||||
-rw-r--r-- | module/remote/ttypes_debug.py | 11 |
3 files changed, 28 insertions, 22 deletions
diff --git a/module/remote/pyload.thrift b/module/remote/pyload.thrift index 077810ecb..6a77bdc1d 100644 --- a/module/remote/pyload.thrift +++ b/module/remote/pyload.thrift @@ -179,10 +179,11 @@ struct PackageInfo { 9: UTCDate added, 10: list<string> tags, 11: PackageStatus status, - 12: i16 packageorder, - 13: PackageStats stats, - 14: list<FileID> fids, - 15: list<PackageID> pids, + 12: bool shared, + 13: i16 packageorder, + 14: PackageStats stats, + 15: list<FileID> fids, + 16: list<PackageID> pids, } // thrift does not allow recursive datatypes, so all data is accumulated and mapped with id @@ -449,6 +450,7 @@ service Pyload { FileInfo getFileInfo(1: FileID fid) throws (1: FileDoesNotExists e), TreeCollection findFiles(1: string pattern), + list<string> getAutocompletion(1: string pattern), TreeCollection findPackages(1: list<string> tags), // Modify Files/Packages diff --git a/module/remote/ttypes.py b/module/remote/ttypes.py index e8ef26dd2..1592829a3 100644 --- a/module/remote/ttypes.py +++ b/module/remote/ttypes.py @@ -138,6 +138,17 @@ class ConfigHolder(BaseObject): self.info = info self.handler = handler +class ConfigInfo(BaseObject): + __slots__ = ['name', 'label', 'description', 'addon', 'user_context', 'activated'] + + def __init__(self, name=None, label=None, description=None, addon=None, user_context=None, activated=None): + self.name = name + self.label = label + self.description = description + self.addon = addon + self.user_context = user_context + self.activated = activated + class ConfigItem(BaseObject): __slots__ = ['name', 'label', 'description', 'type', 'default_value', 'value'] @@ -244,9 +255,9 @@ class PackageDoesNotExists(ExceptionObject): self.pid = pid class PackageInfo(BaseObject): - __slots__ = ['pid', 'name', 'folder', 'root', 'owner', 'site', 'comment', 'password', 'added', 'tags', 'status', 'packageorder', 'stats', 'fids', 'pids'] + __slots__ = ['pid', 'name', 'folder', 'root', 'owner', 'site', 'comment', 'password', 'added', 'tags', 'status', 'shared', 'packageorder', 'stats', 'fids', 'pids'] - def __init__(self, pid=None, name=None, folder=None, root=None, owner=None, site=None, comment=None, password=None, added=None, tags=None, status=None, packageorder=None, stats=None, fids=None, pids=None): + def __init__(self, pid=None, name=None, folder=None, root=None, owner=None, site=None, comment=None, password=None, added=None, tags=None, status=None, shared=None, packageorder=None, stats=None, fids=None, pids=None): self.pid = pid self.name = name self.folder = folder @@ -258,6 +269,7 @@ class PackageInfo(BaseObject): self.added = added self.tags = tags self.status = status + self.shared = shared self.packageorder = packageorder self.stats = stats self.fids = fids @@ -272,17 +284,6 @@ class PackageStats(BaseObject): self.sizetotal = sizetotal self.sizedone = sizedone -class PluginInfo(BaseObject): - __slots__ = ['name', 'label', 'description', 'addon', 'user_context', 'activated'] - - def __init__(self, name=None, label=None, description=None, addon=None, user_context=None, activated=None): - self.name = name - self.label = label - self.description = description - self.addon = addon - self.user_context = user_context - self.activated = activated - class ProgressInfo(BaseObject): __slots__ = ['plugin', 'name', 'statusmsg', 'eta', 'done', 'total', 'download'] @@ -416,6 +417,8 @@ class Iface(object): pass def getAllUserData(self): pass + def getAutocompletion(self, pattern): + pass def getAvailablePlugins(self): pass def getCollector(self): diff --git a/module/remote/ttypes_debug.py b/module/remote/ttypes_debug.py index 17d602f97..84b56e55d 100644 --- a/module/remote/ttypes_debug.py +++ b/module/remote/ttypes_debug.py @@ -10,6 +10,7 @@ classes = { 'AddonInfo' : [basestring, basestring, basestring], 'AddonService' : [basestring, basestring, (list, basestring), (None, int)], 'ConfigHolder' : [basestring, basestring, basestring, basestring, (list, ConfigItem), (None, (list, AddonInfo)), (None, (list, InteractionTask))], + 'ConfigInfo' : [basestring, basestring, basestring, bool, bool, (None, bool)], 'ConfigItem' : [basestring, basestring, basestring, basestring, (None, basestring), basestring], 'DownloadInfo' : [basestring, basestring, basestring, int, basestring, basestring], 'DownloadProgress' : [int, int, int, int], @@ -21,9 +22,8 @@ classes = { 'LinkStatus' : [basestring, basestring, basestring, int, int, basestring], 'OnlineCheck' : [int, (dict, basestring, LinkStatus)], 'PackageDoesNotExists' : [int], - 'PackageInfo' : [int, basestring, basestring, int, int, basestring, basestring, basestring, int, (list, basestring), int, int, PackageStats, (list, int), (list, 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], - 'PluginInfo' : [basestring, basestring, basestring, bool, bool, (None, bool)], 'ProgressInfo' : [basestring, basestring, basestring, int, int, int, (None, DownloadProgress)], 'ServerStatus' : [int, int, int, bool, bool, bool], 'ServiceDoesNotExists' : [basestring, basestring], @@ -65,11 +65,12 @@ methods = { 'getAddonHandler': (dict, basestring, list), 'getAllFiles': TreeCollection, 'getAllUserData': (dict, int, UserData), - 'getAvailablePlugins': (list, PluginInfo), + 'getAutocompletion': (list, basestring), + 'getAvailablePlugins': (list, ConfigInfo), 'getCollector': (list, LinkStatus), 'getConfig': (dict, basestring, ConfigHolder), 'getConfigValue': basestring, - 'getCoreConfig': (list, PluginInfo), + 'getCoreConfig': (list, ConfigInfo), 'getEvents': (list, EventInfo), 'getFileInfo': FileInfo, 'getFileTree': TreeCollection, @@ -80,7 +81,7 @@ methods = { 'getNotifications': (list, InteractionTask), 'getPackageContent': TreeCollection, 'getPackageInfo': PackageInfo, - 'getPluginConfig': (list, PluginInfo), + 'getPluginConfig': (list, ConfigInfo), 'getProgressInfo': (list, ProgressInfo), 'getServerStatus': ServerStatus, 'getServerVersion': basestring, |