mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Fix blocking stat call in local media_source (#127587)
This commit is contained in:
parent
b8d252273d
commit
0177facbf0
@ -225,7 +225,7 @@ class LocalMediaView(http.HomeAssistantView):
|
||||
media_path = self.source.async_full_path(source_dir_id, location)
|
||||
|
||||
# Check that the file exists
|
||||
if not media_path.is_file():
|
||||
if not self.hass.async_add_executor_job(media_path.is_file):
|
||||
raise web.HTTPNotFound
|
||||
|
||||
# Check that it's a media file
|
||||
|
Loading…
x
Reference in New Issue
Block a user