Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback on download completion #123

Closed
dreamflasher opened this issue Jan 12, 2023 · 3 comments · Fixed by #127
Closed

Callback on download completion #123

dreamflasher opened this issue Jan 12, 2023 · 3 comments · Fixed by #127

Comments

@dreamflasher
Copy link
Contributor

It would be great to be able to pass a callback on download completion, ideally with the status of completion (succesful/error, source url, target path). That would for example enable me to implement #122 myself.

@dreamflasher
Copy link
Contributor Author

I think this is relatively easy to implement, I am happy to do it, but at first mypy should be fixed in CI, so that I don't fix it in every new PR.

@dreamflasher
Copy link
Contributor Author

I got the idea from: https://docs.python.org/3/library/asyncio-task.html#asyncio.Task.add_done_callback – but maybe there are not enough use cases in this project for that.

@dreamflasher
Copy link
Contributor Author

Thanks a lot for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant