In order to provide a "generated" filename to the progress bar during DownloadFile.save_to, we need to be able to change the description right after we receive headers but before we call the save_to method.
Because of that, description becomes part of the AbstractProgressListener, albeit optional. Two methods are exposed, one allowing to perform a change on the description and another checking whether the change can be performed. In case of both tqdm and SimpleProgressListener it is impossible to perform the change at any time.
In order to provide a "generated" filename to the progress bar during
DownloadFile.save_to
, we need to be able to change the description right after we receive headers but before we call thesave_to
method.Because of that, description becomes part of the
AbstractProgressListener
, albeit optional. Two methods are exposed, one allowing to perform a change on the description and another checking whether the change can be performed. In case of bothtqdm
andSimpleProgressListener
it is impossible to perform the change at any time.