Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: do not retry mega.nz downloads (#1236)

NTFSvolume8473f3a239f2
diff --git a/cyberdrop_dl/downloader/mega_nz.py b/cyberdrop_dl/downloader/mega_nz.py
index 56331801e..b2990443f 100644
--- a/cyberdrop_dl/downloader/mega_nz.py
+++ b/cyberdrop_dl/downloader/mega_nz.py
@@ -834,13 +834,6 @@ class MegaDownloadClient(DownloadClient):
return asyncio.to_thread(prepare)
- async def download_file(self, manager: Manager, domain: str, media_item: MediaItem) -> bool:
- try:
- return await super().download_file(manager, domain, media_item)
- except DownloadError as e:
- e.retry = False # can not retry
- raise e
-
class MegaDownloader(Downloader):
client: MegaDownloadClient
@@ -849,6 +842,10 @@ class MegaDownloader(Downloader):
super().__init__(manager, domain)
self.api = MegaApi(manager)
+ @property
+ def max_attempts(self):
+ return 1
+
def startup(self) -> None:
"""Starts the downloader."""
self.client = MegaDownloadClient(self.manager) # type: ignore[reportIncompatibleVariableOverride]