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

Method process

module/plugins/internal/SimpleHoster.py:249–286  ·  view source on GitHub ↗
(self, pyfile)

Source from the content-addressed store, hash-verified

247 decode=self.TEXT_ENCODING)
248
249 def process(self, pyfile):
250 self._prepare()
251
252 #@TODO: Remove `handle_multi`, use MultiHoster instead
253 if self.leech_dl:
254 self.log_info(_("Processing as debrid download..."))
255 self.handle_multi(pyfile)
256
257 else:
258 if not self.link and self.direct_dl:
259 self.log_info(_("Looking for direct download link..."))
260 self.handle_direct(pyfile)
261
262 if self.link:
263 self.log_info(_("Direct download link detected"))
264 else:
265 self.log_info(_("Direct download link not found"))
266
267 if not self.link:
268 self._preload()
269 self.check_errors()
270
271 if self.info.get('status', 7) != 2:
272 self.grab_info()
273 self.check_status()
274 self.check_duplicates()
275
276 if self.premium and (not self.CHECK_TRAFFIC or not self.out_of_traffic()):
277 self.log_info(_("Processing as premium download..."))
278 self.handle_premium(pyfile)
279
280 elif not self.LOGIN_ACCOUNT or (not self.CHECK_TRAFFIC or not self.out_of_traffic()):
281 self.log_info(_("Processing as free download..."))
282 self.handle_free(pyfile)
283
284 if self.link and not self.last_download:
285 self.log_info(_("Downloading file..."))
286 self.download(self.link, disposition=self.DISPOSITION)
287
288 def _check_download(self):
289 Hoster._check_download(self)

Callers

nothing calls this directly

Calls 15

_prepareMethod · 0.95
handle_multiMethod · 0.95
handle_directMethod · 0.95
_preloadMethod · 0.95
check_errorsMethod · 0.95
handle_premiumMethod · 0.95
handle_freeMethod · 0.95
log_infoMethod · 0.80
check_duplicatesMethod · 0.80
_Function · 0.50
getMethod · 0.45
grab_infoMethod · 0.45

Tested by

no test coverage detected