Fix media player art (#2879)
This commit is contained in:
parent
9bfac590f6
commit
bafc9413a3
2 changed files with 6 additions and 1 deletions
|
@ -667,6 +667,7 @@ class MediaPlayerDevice(Entity):
|
||||||
class MediaPlayerImageView(HomeAssistantView):
|
class MediaPlayerImageView(HomeAssistantView):
|
||||||
"""Media player view to serve an image."""
|
"""Media player view to serve an image."""
|
||||||
|
|
||||||
|
requires_auth = False
|
||||||
url = "/api/media_player_proxy/<entity(domain=media_player):entity_id>"
|
url = "/api/media_player_proxy/<entity(domain=media_player):entity_id>"
|
||||||
name = "api:media_player:image"
|
name = "api:media_player:image"
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from homeassistant import bootstrap
|
from homeassistant import bootstrap
|
||||||
|
from homeassistant.const import HTTP_HEADER_HA_AUTH
|
||||||
import homeassistant.components.media_player as mp
|
import homeassistant.components.media_player as mp
|
||||||
import homeassistant.components.http as http
|
import homeassistant.components.http as http
|
||||||
|
|
||||||
|
@ -13,6 +14,8 @@ from tests.common import get_test_home_assistant, get_test_instance_port
|
||||||
|
|
||||||
SERVER_PORT = get_test_instance_port()
|
SERVER_PORT = get_test_instance_port()
|
||||||
HTTP_BASE_URL = 'http://127.0.0.1:{}'.format(SERVER_PORT)
|
HTTP_BASE_URL = 'http://127.0.0.1:{}'.format(SERVER_PORT)
|
||||||
|
API_PASSWORD = "test1234"
|
||||||
|
HA_HEADERS = {HTTP_HEADER_HA_AUTH: API_PASSWORD}
|
||||||
|
|
||||||
hass = None
|
hass = None
|
||||||
|
|
||||||
|
@ -26,7 +29,8 @@ def setUpModule(): # pylint: disable=invalid-name
|
||||||
hass = get_test_home_assistant()
|
hass = get_test_home_assistant()
|
||||||
bootstrap.setup_component(hass, http.DOMAIN, {
|
bootstrap.setup_component(hass, http.DOMAIN, {
|
||||||
http.DOMAIN: {
|
http.DOMAIN: {
|
||||||
http.CONF_SERVER_PORT: SERVER_PORT
|
http.CONF_SERVER_PORT: SERVER_PORT,
|
||||||
|
http.CONF_API_PASSWORD: API_PASSWORD,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue