fix(playout): use stream download when fetching files (#2048)
This commit is contained in:
parent
1147853c63
commit
8897d390e1
|
@ -52,8 +52,8 @@ class PypoFile(Thread):
|
||||||
with open(dst, "wb") as handle:
|
with open(dst, "wb") as handle:
|
||||||
logger.info(media_item)
|
logger.info(media_item)
|
||||||
try:
|
try:
|
||||||
response = self.api_client.download_file(file_id)
|
response = self.api_client.download_file(file_id, stream=True)
|
||||||
for chunk in response.iter_content(chunk_size=1024):
|
for chunk in response.iter_content(chunk_size=2048):
|
||||||
handle.write(chunk)
|
handle.write(chunk)
|
||||||
|
|
||||||
except HTTPError as exception:
|
except HTTPError as exception:
|
||||||
|
|
Loading…
Reference in New Issue