diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-10 23:43:10 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-10 23:43:10 +0100 |
commit | 2b353fa266c13b77b2c77af797dc28c8380b9443 (patch) | |
tree | db1e1b9f67cf87ffb711f91c643d665bae1bee8a /module/remote/thriftbackend/Handler.py | |
parent | thrift + setup fixes (diff) | |
download | pyload-2b353fa266c13b77b2c77af797dc28c8380b9443.tar.xz |
more fixes
Diffstat (limited to 'module/remote/thriftbackend/Handler.py')
-rw-r--r-- | module/remote/thriftbackend/Handler.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/module/remote/thriftbackend/Handler.py b/module/remote/thriftbackend/Handler.py index de7232758..da77b8ed2 100644 --- a/module/remote/thriftbackend/Handler.py +++ b/module/remote/thriftbackend/Handler.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from thriftgen.pyload.ttypes import * from thriftgen.pyload.Pyload import Iface @@ -130,7 +132,7 @@ class Handler(Iface): x.active and x.active != "quit"]: if not isinstance(pyfile, PyFile): continue - status = DownloadStatus() + status = DownloadInfo() status.id = pyfile.id status.name = pyfile.name status.speed = pyfile.getSpeed() / 1024 @@ -165,19 +167,19 @@ class Handler(Iface): """ pdata = PackageData() rawData = self.serverMethods.get_package_data(pid) - print rawData pdata.pid = rawData["id"] pdata.name = rawData["name"] pdata.folder = rawData["folder"] pdata.site = rawData["site"] pdata.password = rawData["password"] - pdata.queue = rawData["queue"] + pdata.dest = rawData["queue"] pdata.order = rawData["order"] pdata.priority = rawData["priority"] pdata.links = [] for id, pyfile in rawData["links"].iteritems(): pdata.links.append(self._convertPyFile(pyfile)) + return pdata def getFileData(self, fid): @@ -215,7 +217,7 @@ class Handler(Iface): pdata.folder = pack["folder"] pdata.site = pack["site"] pdata.password = pack["password"] - pdata.queue = pack["queue"] + pdata.dest = pack["queue"] pdata.order = pack["order"] pdata.priority = pack["priority"] pdata.links = [int(x) for x in pack["links"].keys()] @@ -233,7 +235,7 @@ class Handler(Iface): pdata.folder = pack["folder"] pdata.site = pack["site"] pdata.password = pack["password"] - pdata.queue = pack["queue"] + pdata.dest = pack["queue"] pdata.order = pack["order"] pdata.priority = pack["priority"] pdata.links = [int(x) for x in pack["links"].keys()] |