From 393b12c7f002c5ba273db7d7bc18158fdae6c57f Mon Sep 17 00:00:00 2001 From: blackicedbear Date: Sat, 27 Sep 2025 20:00:51 +0200 Subject: [PATCH] Fixed missing segment error for aria2c downloader --- devine/core/downloaders/aria2c.py | 6 ++++++ 1 file changed, 6 insertions(+) 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,