feat: support extension onDone event (#728)

This commit is contained in:
Levi authored and GitHub committed 2024-09-07 10:10:39 +08:00
1 parent 0c17093b1a
commit 51244133e0
5 files changed
+80 -6

No files matched your search

+1
View File
@@ -761,6 +761,7 @@ func (d *Downloader) watch(task *Task) {
d.emit(EventKeyDone, task)
d.emit(EventKeyFinally, task, err)
d.notifyRunning()
d.triggerOnDone(task)
if e, ok := task.Meta.Opts.Extra.(*http.OptsExtra); ok {
downloadFilePath := task.Meta.SingleFilepath()