diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-12-20 15:33:01 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-12-20 15:33:01 +0100 |
commit | ceb59ee0739546368135b0d86a69b17c92bfbccf (patch) | |
tree | 863b70e281f8aa833d2a4a72a61f25113dd9b8e3 /module/FileManager.py | |
parent | separated handlebars init (diff) | |
download | pyload-ceb59ee0739546368135b0d86a69b17c92bfbccf.tar.xz |
added models and collections for progress
Diffstat (limited to 'module/FileManager.py')
-rw-r--r-- | module/FileManager.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/module/FileManager.py b/module/FileManager.py index cf4989f99..1d8cdf328 100644 --- a/module/FileManager.py +++ b/module/FileManager.py @@ -29,6 +29,7 @@ from datatypes.PyPackage import PyPackage, RootPackage def invalidate(func): def new(*args): args[0].filecount = -1 + args[0].downloadcount = -1 args[0].queuecount = -1 args[0].jobCache = {} return func(*args) @@ -65,6 +66,7 @@ class FileManager: #self.lock._Verbose__verbose = True self.filecount = -1 # if an invalid value is set get current value from db + self.downloadcount = -1 # number of downloads self.queuecount = -1 # number of package to be loaded self.db = self.core.db @@ -301,6 +303,13 @@ class FileManager: return self.filecount + def getDownloadCount(self): + """ return number of downloads """ + if self.downloadcount == -1: + self.downloadcount = self.db.downloadcount() + + return self.downloadcount + def getQueueCount(self, force=False): """number of files that have to be processed""" if self.queuecount == -1 or force: |