-
-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Use media player image proxy for roku media browser #43070
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
Changes from 14 commits
987f155
a3b8a1e
e33ef6a
d24168b
f0a5f12
99dfb5b
71671db
71bcbbc
8bf3296
be8e761
2a841c5
9d26ff6
87d2e17
fe5c839
13d4ac2
6292fad
9ebd887
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -238,16 +238,33 @@ async def search(self, keyword): | |
| """Emulate opening the search screen and entering the search keyword.""" | ||
| await self.coordinator.roku.search(keyword) | ||
|
|
||
| async def async_get_browse_image( | ||
| self, media_content_type, media_content_id, media_image_id=None | ||
| ): | ||
| """Fetch media browser image to serve via proxy.""" | ||
| if media_content_type == MEDIA_TYPE_APP and media_content_id: | ||
| image_url = self.coordinator.roku.app_icon_url(media_content_id) | ||
| result = await self._async_fetch_image(image_url) | ||
| if result == (None, None): | ||
| _LOGGER.debug("Error retrieving proxied image from %s", image_url) | ||
|
ctalkington marked this conversation as resolved.
Outdated
|
||
| return result | ||
|
|
||
| return (None, None) | ||
|
|
||
| async def async_browse_media(self, media_content_type=None, media_content_id=None): | ||
| """Implement the websocket media browsing helper.""" | ||
|
|
||
| def _get_thumbnail_url(*args, **kwargs): | ||
| return self.get_browse_image_url(*args, **kwargs) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add same logic as #43089
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so the issue with roku images is they arent accessible over https so wed need a bit deeper of a check to check if internal and non-https request.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh right. Squeezebox will have the same issue.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, that is not a problem. Locally there can't be valid SSL anyway
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah ok. I can look into doing an update tonight for internal check |
||
|
|
||
| if media_content_type in [None, "library"]: | ||
| return library_payload(self.coordinator) | ||
| return library_payload(self.coordinator, _get_thumbnail_url) | ||
|
|
||
| payload = { | ||
| "search_type": media_content_type, | ||
| "search_id": media_content_id, | ||
| } | ||
| response = build_item_response(self.coordinator, payload) | ||
| response = build_item_response(self.coordinator, payload, _get_thumbnail_url) | ||
|
|
||
| if response is None: | ||
| raise BrowseError( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.