diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-12 19:23:51 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-12 19:23:51 +0200 |
commit | f0afbee15380bf5fc242fb3dd5439a9ea9c67d5c (patch) | |
tree | 7e82c022c157a39232fc590ab2ffa69787f5d260 /pyload/datatype | |
parent | Cleanup (diff) | |
parent | import fixes + code-cleanup (diff) | |
download | pyload-f0afbee15380bf5fc242fb3dd5439a9ea9c67d5c.tar.xz |
Merge branch 'pr/n3_ardi69' into 0.4.10
Conflicts:
pyload/plugin/Plugin.py
pyload/webui/app/pyloadweb.py
Diffstat (limited to 'pyload/datatype')
-rw-r--r-- | pyload/datatype/File.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/pyload/datatype/File.py b/pyload/datatype/File.py index 1df0a8590..0445e8089 100644 --- a/pyload/datatype/File.py +++ b/pyload/datatype/File.py @@ -9,32 +9,33 @@ from time import sleep, time from threading import RLock statusMap = { - "finished": 0, - "offline": 1, - "online": 2, - "queued": 3, - "skipped": 4, - "waiting": 5, + "finished" : 0, + "offline" : 1, + "online" : 2, + "queued" : 3, + "skipped" : 4, + "waiting" : 5, "temp. offline": 6, - "starting": 7, - "failed": 8, - "aborted": 9, - "decrypting": 10, - "custom": 11, - "downloading": 12, - "processing": 13, - "unknown": 14, + "starting" : 7, + "failed" : 8, + "aborted" : 9, + "decrypting" : 10, + "custom" : 11, + "downloading" : 12, + "processing" : 13, + "unknown" : 14, } def setSize(self, value): self._size = int(value) + class PyFile(object): """ Represents a file object at runtime """ - __slots__ = ("m", "id", "url", "name", "size", "_size", "status", "plugin", + __slots__ = ("m", "id", "url", "name", "size", "_size", "status", "plugintype", "pluginname", "packageid", "error", "order", "lock", "plugin", "waitUntil", "active", "abort", "statusname", "reconnected", "progress", "maxprogress", "pluginmodule", "pluginclass") @@ -47,8 +48,8 @@ class PyFile(object): self.name = name self.size = size self.status = status - self.plugin = self.plugintype, self.pluginname = plugin - self.packageid = package #should not be used, use package() instead + self.plugintype, self.pluginname = plugin + self.packageid = package # should not be used, use package() instead self.error = error self.order = order # database information ends here @@ -58,10 +59,10 @@ class PyFile(object): self.plugin = None #self.download = None - self.waitUntil = 0 # time() + time to wait + self.waitUntil = 0 # time() + time to wait # status attributes - self.active = False #obsolete? + self.active = False # obsolete? self.abort = False self.reconnected = False @@ -72,7 +73,6 @@ class PyFile(object): self.m.cache[int(id)] = self - # will convert all sizes to ints size = property(lambda self: self._size, setSize) @@ -101,7 +101,7 @@ class PyFile(object): def setStatus(self, status): self.status = statusMap[status] - self.sync() #@TODO needed aslong no better job approving exists + self.sync() # @TODO needed aslong no better job approving exists def setCustomStatus(self, msg, status="processing"): self.statusname = msg |