mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Sort folders and files in file browser
This commit is contained in:
parent
209008e50d
commit
12effd643f
1 changed files with 2 additions and 2 deletions
|
@ -1229,7 +1229,7 @@ def browse_path(path=None, include_hidden=False, filter_ext=''):
|
|||
output.append(out)
|
||||
|
||||
for root, dirs, files in os.walk(path):
|
||||
for d in dirs:
|
||||
for d in sorted(dirs):
|
||||
if not include_hidden and d.startswith('.'):
|
||||
continue
|
||||
dir_path = os.path.join(root, d)
|
||||
|
@ -1241,7 +1241,7 @@ def browse_path(path=None, include_hidden=False, filter_ext=''):
|
|||
'icon': 'folder'
|
||||
}
|
||||
output.append(out)
|
||||
for f in files:
|
||||
for f in sorted(files):
|
||||
if not include_hidden and f.startswith('.'):
|
||||
continue
|
||||
if filter_ext and not f.endswith(filter_ext):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue