diff options
author | mkaay <mkaay@mkaay.de> | 2011-02-13 15:06:03 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-02-13 15:06:03 +0100 |
commit | 908c28bab89525250172a4013667319942846065 (patch) | |
tree | 73b85517ae12f8be4bc2071409136f181907795d /module/remote/thriftbackend/Handler.py | |
parent | cleanup (diff) | |
download | pyload-908c28bab89525250172a4013667319942846065.tar.xz |
fixes + improvements
Diffstat (limited to 'module/remote/thriftbackend/Handler.py')
-rw-r--r-- | module/remote/thriftbackend/Handler.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/remote/thriftbackend/Handler.py b/module/remote/thriftbackend/Handler.py index 6eb2a8bc6..6e1377938 100644 --- a/module/remote/thriftbackend/Handler.py +++ b/module/remote/thriftbackend/Handler.py @@ -4,6 +4,7 @@ from thriftgen.pyload.ttypes import * from thriftgen.pyload.Pyload import Iface from module.PyFile import PyFile +from module.utils import freeSpace class Handler(Iface): def __init__(self, backend): @@ -90,7 +91,7 @@ class Handler(Iface): return serverStatus def freeSpace(self): - return self.core.freeSpace() #bytes + return freeSpace(self.core.config["general"]["download_folder"]) def getServerVersion(self): return self.serverMethods.get_server_version() @@ -479,13 +480,13 @@ class Handler(Iface): self.serverMethods.remove_account(plugin, account) #auth - def login(self, username, password): + def login(self, username, password, remoteip=None): """ Parameters: - username - password """ - return True if self.serverMethods.checkAuth(username, password) else False + return self.backend.checkAuth(username, password, remoteip) def getUserData(self): return self.serverMethods.checkAuth(username, password) |