Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalkington committed Nov 11, 2020
1 parent cb65d04 commit 209ed2b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions homeassistant/components/media_player/__init__.py
Expand Up @@ -910,15 +910,12 @@ def get_browse_image_url(
f"/api/media_player_proxy/{self.entity_id}/browse_media"
f"/{media_content_type}/{media_content_id}"
)
url = str(
URL(url_path).with_query(
{
"token": self.access_token,
"media_image_id": media_image_id,
}
)
)
return url

url_query = {"token": self.access_token}
if media_image_id:
url_query.update({"media_image_id": media_image_id})

return str(URL(url_path).with_query(url_query))


class MediaPlayerImageView(HomeAssistantView):
Expand Down

0 comments on commit 209ed2b

Please sign in to comment.