From 2c684d72fd8234940a921d4f2a5db28dbadaafa1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 5 Oct 2012 19:01:15 +0200 Subject: updated lodash, tried to style package list --- module/remote/pyload.thrift | 21 ++++++++++++++++----- module/remote/ttypes.py | 11 +++++++++-- 2 files changed, 25 insertions(+), 7 deletions(-) (limited to 'module/remote') 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 fids, - 14: list pids, + 10: list tags, + 11: PackageStatus status, + 12: i16 packageorder, + 13: PackageStats stats, + 14: list fids, + 15: list 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 -- cgit v1.2.3