MCPcopy
hub / github.com/pyload/pyload / statusDownloads

Method statusDownloads

module/Api.py:292–308  ·  view source on GitHub ↗

Status off all currently running downloads. :return: list of `DownloadStatus`

(self)

Source from the content-addressed store, hash-verified

290
291 @permission(PERMS.LIST)
292 def statusDownloads(self):
293 """ Status off all currently running downloads.
294
295 :return: list of `DownloadStatus`
296 """
297 data = []
298 for pyfile in self.core.threadManager.getActiveFiles():
299 if not isinstance(pyfile, PyFile):
300 continue
301
302 data.append(DownloadInfo(
303 pyfile.id, pyfile.name, pyfile.getSpeed(), pyfile.getETA(), pyfile.formatETA(),
304 pyfile.getBytesLeft(), pyfile.getSize(), pyfile.formatSize(), pyfile.getPercent(),
305 pyfile.status, pyfile.getStatusName(), pyfile.formatWait(),
306 pyfile.waitUntil, pyfile.packageid, pyfile.package().name, pyfile.pluginname))
307
308 return data
309
310 @permission(PERMS.ADD)
311 def addPackage(self, name, links, dest=Destination.Queue):

Callers 2

renderHeaderMethod · 0.45
processCommandMethod · 0.45

Calls 13

getETAMethod · 0.80
formatETAMethod · 0.80
getBytesLeftMethod · 0.80
getSizeMethod · 0.80
formatSizeMethod · 0.80
getPercentMethod · 0.80
getStatusNameMethod · 0.80
formatWaitMethod · 0.80
packageMethod · 0.80
DownloadInfoClass · 0.50
getActiveFilesMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected