-
Notifications
You must be signed in to change notification settings - Fork 10
Fixed 2 problems : https url images and infinite cycle update of image url #114
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
Closed
Closed
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
46af0e4
Fixed 2 problems : infinite cycle update of media image url between n…
albaintor 93cbafc
Handled image resize : if width or height exceed 900px, it makes the …
albaintor e04f20c
Linting
albaintor c9d6080
Merge branch 'main' into chromecast_plex
albaintor cd5a92c
Dynamic rewrite of Plex image URLs
albaintor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https image urls are supported in the UI! I just verified it again and it works.
What's not supported are invalid and self-signed certificates.
Does
httpx.AsyncClient(verify=False)in src/external_metadata.py disable certificate validation?Base64 embedding is quite an overhead and should be avoided when possible. The image now also gets resized twice, in the integration and again in the UI.
Large base64 data can create WebSocket issues if the image is too large. The entity change events are distributed to every connected client using the Core-API, for example the web-configurator.
If there are problematic URLs that can't be processed in the UI then it should be fixed there, solving it for every integration. I'll check about certificate checks in the UI if they could be disabled with a user option, even though I have quite a strong opinion that one should only use valid certificates :-)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At start I thought that https wasn't supported but Marton said it was and this narrowed this down to the certificate (self signed). But this is not possible to determine if the https is or not self signed
Yes
httpx.AsyncClient(verify=False)disables SSL verification and this change is necessary for some apps such as Plex hosting media files locally (on a NAS...) and exposing https image urls.But if you disable it at the UI/core level it will indeed work for all. I just assumed that the risk was lower to make it only for AndroidTV
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test if https works is easy: hardcode a https image url from a public website in tv.py, for example:
There might still be some occasional hickups in the UI showing the loading dot. We'll check that again too.
httpx.AsyncClient makes it too easy disabling certificate checks. No wonder we are still using self signed certificates :-( Let's Encrypt has been around for a while... /rant off