Prevent item appear in media browser if name starts with dot (#69820)
This commit is contained in:
parent
f456996e12
commit
25504b697c
1 changed files with 4 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue