Callback on download completion
dreamflasher opened this issue · comments
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.
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.
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.
Thanks a lot for merging!