mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[pp] add 'error' event
This commit is contained in:
parent
5d984f35aa
commit
2e1dab3036
@ -6126,6 +6126,8 @@ Description
|
|||||||
After a file got moved to its target location
|
After a file got moved to its target location
|
||||||
``skip``
|
``skip``
|
||||||
When skipping a file download
|
When skipping a file download
|
||||||
|
``error``
|
||||||
|
After a file download failed
|
||||||
``post``
|
``post``
|
||||||
When starting to download all files of a `post`,
|
When starting to download all files of a `post`,
|
||||||
e.g. a Tweet on Twitter or a post on Patreon.
|
e.g. a Tweet on Twitter or a post on Patreon.
|
||||||
|
@ -347,6 +347,9 @@ class DownloadJob(Job):
|
|||||||
self.status |= 4
|
self.status |= 4
|
||||||
self.log.error("Failed to download %s",
|
self.log.error("Failed to download %s",
|
||||||
pathfmt.filename or url)
|
pathfmt.filename or url)
|
||||||
|
if "error" in hooks:
|
||||||
|
for callback in hooks["error"]:
|
||||||
|
callback(pathfmt)
|
||||||
return
|
return
|
||||||
|
|
||||||
if not pathfmt.temppath:
|
if not pathfmt.temppath:
|
||||||
|
Loading…
Reference in New Issue
Block a user