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

Refactor image handling a bit #579

Merged
merged 3 commits into from
Mar 27, 2023
Merged

Conversation

marcelveldt
Copy link
Member

Refactors the logic to resolve images that are not (or may be not) remotely accessible. Instead of limiting that functionality to the file providers, this is now useable for other providers too (e.g. Plex)

@marcelveldt
Copy link
Member Author

I'll go ahead and merge this and adjust the frontend so you can give it a test and we address any issues you may find then.

@marcelveldt marcelveldt merged commit 92ef2e7 into main Mar 27, 2023
@marcelveldt marcelveldt deleted the refactor-image-handling-a-bit branch March 27, 2023 07:25
Comment on lines 280 to 282
encoded_url = urllib.parse.quote(urllib.parse.quote(img.url))
return f"{self.mass.webserver.base_url}/imageproxy?path={encoded_url}"
return img.url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be img.path, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, yes and thats why we invented code reviews :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it on main

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