diff options
Diffstat (limited to 'module/remote')
-rw-r--r-- | module/remote/pyload.thrift | 21 | ||||
-rw-r--r-- | module/remote/ttypes.py | 11 |
2 files changed, 25 insertions, 7 deletions
diff --git a/module/remote/pyload.thrift b/module/remote/pyload.thrift index 8257107b4..3b0f74cbc 100644 --- a/module/remote/pyload.thrift +++ b/module/remote/pyload.thrift @@ -32,6 +32,16 @@ enum DownloadStatus { Unknown } +// Download states, combination of several downloadstatuses +// defined in Filedatabase +enum DownloadStates { + All, + Finished, + Unfinished, + Failed, + Unmanaged // internal state +} + enum MediaType { All = 0 Other = 1, @@ -166,11 +176,12 @@ struct PackageInfo { 7: string comment, 8: string password, 9: UTCDate added, - 10: PackageStatus status, - 11: i16 packageorder, - 12: PackageStats stats, - 13: list<FileID> fids, - 14: list<PackageID> pids, + 10: list<string> tags, + 11: PackageStatus status, + 12: i16 packageorder, + 13: PackageStats stats, + 14: list<FileID> fids, + 15: list<PackageID> pids, } // thrift does not allow recursive datatypes, so all data is accumulated and mapped with id diff --git a/module/remote/ttypes.py b/module/remote/ttypes.py index 06f051fc7..70105275d 100644 --- a/module/remote/ttypes.py +++ b/module/remote/ttypes.py @@ -6,6 +6,12 @@ class BaseObject(object): __slots__ = [] +class DownloadStates: + Failed = 2 + Finished = 0 + Unfinished = 1 + Unmanaged = 3 + class DownloadStatus: Aborted = 12 Custom = 15 @@ -229,9 +235,9 @@ class PackageDoesNotExists(Exception): self.pid = pid class PackageInfo(BaseObject): - __slots__ = ['pid', 'name', 'folder', 'root', 'owner', 'site', 'comment', 'password', 'added', 'status', 'packageorder', 'stats', 'fids', 'pids'] + __slots__ = ['pid', 'name', 'folder', 'root', 'owner', 'site', 'comment', 'password', 'added', 'tags', 'status', '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, 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, packageorder=None, stats=None, fids=None, pids=None): self.pid = pid self.name = name self.folder = folder @@ -241,6 +247,7 @@ class PackageInfo(BaseObject): self.comment = comment self.password = password self.added = added + self.tags = tags self.status = status self.packageorder = packageorder self.stats = stats |