mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Fix non-thread-safe operations in media_extractor (#116065)
This commit is contained in:
parent
62dadc47ff
commit
f9c2cd73f5
@ -55,7 +55,7 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the media extractor service."""
|
"""Set up the media extractor service."""
|
||||||
|
|
||||||
async def extract_media_url(call: ServiceCall) -> ServiceResponse:
|
async def extract_media_url(call: ServiceCall) -> ServiceResponse:
|
||||||
@ -114,7 +114,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
supports_response=SupportsResponse.ONLY,
|
supports_response=SupportsResponse.ONLY,
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.services.register(
|
hass.services.async_register(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_PLAY_MEDIA,
|
SERVICE_PLAY_MEDIA,
|
||||||
play_media,
|
play_media,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user