summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-12-20 15:33:01 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-12-20 15:33:01 +0100
commitceb59ee0739546368135b0d86a69b17c92bfbccf (patch)
tree863b70e281f8aa833d2a4a72a61f25113dd9b8e3 /module/Api.py
parentseparated handlebars init (diff)
downloadpyload-ceb59ee0739546368135b0d86a69b17c92bfbccf.tar.xz
added models and collections for progress
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/module/Api.py b/module/Api.py
index 8422a10a0..d1ccf43c0 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -177,14 +177,13 @@ class Api(Iface):
# TODO
@RequirePerm(Permission.All)
- def statusServer(self):
+ def getServerStatus(self):
"""Some general information about the current status of pyLoad.
:return: `ServerStatus`
"""
- serverStatus = ServerStatus(self.core.threadManager.pause, len(self.core.threadManager.processingIds()),
- self.core.files.getQueueCount(), self.core.files.getFileCount(), 0,
- not self.core.threadManager.pause and self.isTimeDownload(),
+ serverStatus = ServerStatus(self.core.files.getQueueCount(), self.core.files.getFileCount(), 0,
+ not self.core.threadManager.pause and self.isTimeDownload(), self.core.threadManager.pause,
self.core.config['reconnect']['activated'] and self.isTimeReconnect())
for pyfile in self.core.threadManager.getActiveDownloads():
@@ -192,6 +191,14 @@ class Api(Iface):
return serverStatus
+ @RequirePerm(Permission.All)
+ def getProgressInfo(self):
+ """ Status of all currently running tasks
+
+ :return: list of `ProgressInfo`
+ """
+ pass
+
def pauseServer(self):
"""Pause server: It won't start any new downloads, but nothing gets aborted."""
self.core.threadManager.pause = True
@@ -221,7 +228,7 @@ class Api(Iface):
return free_space(self.core.config["general"]["download_folder"])
- def kill(self):
+ def stop(self):
"""Clean way to quit pyLoad"""
self.core.do_kill = True
@@ -266,14 +273,6 @@ class Api(Iface):
end = self.core.config['reconnect']['endTime'].split(":")
return compare_time(start, end) and self.core.config["reconnect"]["activated"]
- @RequirePerm(Permission.All)
- def getProgressInfo(self):
- """ Status of all currently running tasks
-
- :return: list of `ProgressInfo`
- """
- pass
-
##########################
# Configuration
##########################