MCPcopy
hub / github.com/pyload/pyload / _finalize

Method _finalize

module/plugins/internal/Hoster.py:137–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135
136 #@TODO: Remove in 0.4.10
137 def _finalize(self):
138 pypack = self.pyfile.package()
139
140 self.pyload.hookManager.dispatchEvent("download_processed", self.pyfile)
141
142 try:
143 unfinished = any(fdata.get('status') in (3, 7) for fid, fdata in pypack.getChildren().items()
144 if fid != self.pyfile.id)
145 if unfinished:
146 return
147
148 self.pyload.hookManager.dispatchEvent("package_processed", pypack)
149
150 failed = any(fdata.get('status') in (1, 6, 8, 9, 14)
151 for fid, fdata in pypack.getChildren().items())
152
153 if not failed:
154 return
155
156 self.pyload.hookManager.dispatchEvent("package_failed", pypack)
157
158 finally:
159 self.check_status()
160
161 def isresource(self, url, redirect=True, resumable=None):
162 resource = False

Callers 1

_processMethod · 0.95

Calls 6

packageMethod · 0.80
dispatchEventMethod · 0.80
itemsMethod · 0.80
getChildrenMethod · 0.80
getMethod · 0.45
check_statusMethod · 0.45

Tested by

no test coverage detected