mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Prevent item appear in media browser if name starts with dot (#69820)
This commit is contained in:
parent
f456996e12
commit
25504b697c
@ -180,9 +180,10 @@ class LocalSource(MediaSource):
|
||||
# Append first level children
|
||||
media.children = []
|
||||
for child_path in path.iterdir():
|
||||
child = self._build_item_response(source_dir_id, child_path, True)
|
||||
if child:
|
||||
media.children.append(child)
|
||||
if child_path.name[0] != ".":
|
||||
child = self._build_item_response(source_dir_id, child_path, True)
|
||||
if child:
|
||||
media.children.append(child)
|
||||
|
||||
# Sort children showing directories first, then by name
|
||||
media.children.sort(key=lambda child: (child.can_play, child.title))
|
||||
|
Loading…
x
Reference in New Issue
Block a user