Fix non-thread-safe operations in media_extractor (#116065)

This commit is contained in:
J. Nick Koston 2024-04-24 02:19:18 +02:00 committed by GitHub
parent 62dadc47ff
commit f9c2cd73f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,