MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / cancel

Method cancel

MCSL2Lib/ProgramControllers/downloadController.py:240–248  ·  view source on GitHub ↗

取消下载

(self)

Source from the content-addressed store, hash-verified

238 self.start_download()
239
240 def cancel(self):
241 """取消下载"""
242 if self.is_cancelled:
243 return
244 self.is_cancelled = True
245 self.progress_timer.stop()
246 if self.downloader:
247 self.downloader.stop()
248 self._cleanup_files()
249
250 def _update_progress(self):
251 """更新下载进度 - 从 pypdl 获取"""

Callers 1

cancelDownloadTaskMethod · 0.45

Calls 2

_cleanup_filesMethod · 0.95
stopMethod · 0.80

Tested by

no test coverage detected