ed-cooper / lecture-hoarder

Automated tool to download University of Manchester lecture podcasts
GNU General Public License v3.0
3 stars 1 forks source link

Change get_podcast_downloader return type #22

Open ed-cooper opened 4 years ago

ed-cooper commented 4 years ago

This return type is the only thing preventing the entire PodcastProvider interface being entirely independent of the web.

The return type will need to support asynchronous downloading and contain the total download size (as given by int(http_download_response.headers['Content-Length'])).

This will probably require the creation of a new class for the return type.

ed-cooper commented 4 years ago

The current return type (requests.Response) also does not guarantee that response streaming is even supported, giving more motivation to change it

ed-cooper commented 4 years ago

Looks like the stream type will have to be an iterator