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 album_art() in __init__.py #2823

Merged
merged 3 commits into from
Feb 28, 2018
Merged

Fix album_art() in __init__.py #2823

merged 3 commits into from
Feb 28, 2018

Conversation

waweic
Copy link
Contributor

@waweic waweic commented Feb 26, 2018

flask.send_file() expects a string, g.lib.get_album() returns bytes. Added decode() to album_art().

If g.lib.get_album() gets a non-existing id, it returns None. Python would throw an error in this case. Added check to prevent this.

flask.send_file() expects a string, g.lib.get_album() returns bytes. Added decode() to album_art(). 

If g.lib.get_album() gets a non-existing id, it returns None. Python would throw an error in this case. Added check to prevent this.
@sampsyo
Copy link
Member

sampsyo commented Feb 26, 2018

Got it—looks like this is two independent bugs.

For the additional .decode: this looks like a Python 3-specific change; do you know whether this still works under Python 2? That would be good to certify.

For a changelog entry, something close to the descriptions above would work well. 👍

@waweic
Copy link
Contributor Author

waweic commented Feb 26, 2018

Yes, they are independent in theory. I have just put them in one PR because it seemed more practical. It works both in Python 2.7 and Python 3.6. I'm going to write the Changelog entry tomorrow.

@sampsyo
Copy link
Member

sampsyo commented Feb 28, 2018

Perfect. Thanks again!

@sampsyo sampsyo merged commit 7fae3da into beetbox:master Feb 28, 2018
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.

2 participants