diff --git a/devine/core/downloaders/aria2c.py b/devine/core/downloaders/aria2c.py index 3e234ee..7bf4877 100644 --- a/devine/core/downloaders/aria2c.py +++ b/devine/core/downloaders/aria2c.py @@ -220,6 +220,7 @@ def download( for dl in stopped_downloads: if dl["status"] == "error": + error_code = int(dl.get("errorCode", 0)) used_uri = next( uri["uri"] for file in dl["files"] @@ -227,6 +228,11 @@ def download( for uri in file["uris"] if uri["status"] == "used" ) + + if error_code == 404: + yield dict(downloaded=f"[yellow]Skipped missing segment: {used_uri}") + continue # don’t raise, safely ignore + error = f"Download Error (#{dl['gid']}): {dl['errorMessage']} ({dl['errorCode']}), {used_uri}" error_pretty = "\n ".join(textwrap.wrap( error,