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

fix get_thumbnail to download entire graphic #28

Merged

Conversation

VoiceOfSoftware
Copy link
Contributor

This is my first time using GitHub, and first time writing Python, so apologies if I'm doing this wrong!

My issue was that downloading thumbnails did not retrieve all of the data from The Frame. A 59K png only received about 3K, and then stopped. So I added a while loop that keeps downloading until the socket is finished sending data (e.g. header['fileLength'])

This was my test code that was failing to download the entire png:
thumbnail = tv.art().get_thumbnail('MY_F0011')
file = open('MY_F0011.png', 'wb')
data = file.write(thumbnail)
file.close()

@xchwarze xchwarze merged commit d539372 into xchwarze:master Nov 11, 2021
@xchwarze
Copy link
Owner

thanks for pr!

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 this pull request may close these issues.

None yet

2 participants