aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/job.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-10-25 17:27:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-10-25 17:27:36 -0400
commita46d8cec37ef1e7370a3127dd5bf3a47e7dc40de (patch)
tree27382aedd6d14d1add2b1a37e6df2f3e52f0ac4e /gallery_dl/job.py
parente4f39ad7148b104ab522ee13e4af3d3003b65e0f (diff)
parentfc004701f923bb954a22c7fec2ae8d607e78cb2b (diff)
Update upstream source from tag 'upstream/1.27.7'
Update to upstream version '1.27.7' with Debian dir f4e7d47b82b8fc4fb17fad4aa54873015dcc81c1
Diffstat (limited to 'gallery_dl/job.py')
-rw-r--r--gallery_dl/job.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gallery_dl/job.py b/gallery_dl/job.py
index 4affd55..30801ee 100644
--- a/gallery_dl/job.py
+++ b/gallery_dl/job.py
@@ -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:
@@ -433,7 +436,8 @@ class DownloadJob(Job):
if status:
self.status |= status
- if "_fallback" in kwdict and self.fallback:
+ if (status & 95 and # not FormatError or OSError
+ "_fallback" in kwdict and self.fallback):
fallback = kwdict["_fallback"] = \
iter(kwdict["_fallback"])
try: