[pp] add 'error' event

This commit is contained in:
Mike Fährmann
2024-10-19 20:30:34 +02:00
parent 5d984f35aa
commit 2e1dab3036
2 changed files with 5 additions and 0 deletions

View File

@@ -347,6 +347,9 @@ class DownloadJob(Job):
self.status |= 4
self.log.error("Failed to download %s",
pathfmt.filename or url)
if "error" in hooks:
for callback in hooks["error"]:
callback(pathfmt)
return
if not pathfmt.temppath: