MCPcopy Index your code
hub / github.com/pyload/pyload / update

Method update

module/gui/Queue.py:115–144  ·  view source on GitHub ↗

update slot for download status updating

(self)

Source from the content-addressed store, hash-verified

113 self.mutex.lock()
114
115 def update(self):
116 """
117 update slot for download status updating
118 """
119 locker = QMutexLocker(self.mutex)
120 downloading = self.connector.statusDownloads()
121 if not downloading:
122 return
123 for p, pack in enumerate(self._data):
124 for d in downloading:
125 child = pack.getChild(d.fid)
126 if child:
127 dd = {
128 "name": d.name,
129 "speed": d.speed,
130 "eta": d.eta,
131 "format_eta": d.format_eta,
132 "bleft": d.bleft,
133 "size": d.size,
134 "format_size": d.format_size,
135 "percent": d.percent,
136 "status": d.status,
137 "statusmsg": d.statusmsg,
138 "format_wait": d.format_wait,
139 "wait_until": d.wait_until
140 }
141 child.data["downloading"] = dd
142 k = pack.getChildKey(d.fid)
143 self.emit(SIGNAL("dataChanged(const QModelIndex &, const QModelIndex &)"), self.index(k, 0, self.index(p, 0)), self.index(k, self.cols, self.index(p, self.cols)))
144 self.updateCount()
145
146 def headerData(self, section, orientation, role=Qt.DisplayRole):
147 """

Callers

nothing calls this directly

Calls 5

updateCountMethod · 0.95
getChildKeyMethod · 0.80
statusDownloadsMethod · 0.45
getChildMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected