Fix blocking stat call in local media_source (#127587)
This commit is contained in:
parent
b8d252273d
commit
0177facbf0
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue