mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -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)
|
output.append(out)
|
||||||
|
|
||||||
for root, dirs, files in os.walk(path):
|
for root, dirs, files in os.walk(path):
|
||||||
for d in dirs:
|
for d in sorted(dirs):
|
||||||
if not include_hidden and d.startswith('.'):
|
if not include_hidden and d.startswith('.'):
|
||||||
continue
|
continue
|
||||||
dir_path = os.path.join(root, d)
|
dir_path = os.path.join(root, d)
|
||||||
|
@ -1241,7 +1241,7 @@ def browse_path(path=None, include_hidden=False, filter_ext=''):
|
||||||
'icon': 'folder'
|
'icon': 'folder'
|
||||||
}
|
}
|
||||||
output.append(out)
|
output.append(out)
|
||||||
for f in files:
|
for f in sorted(files):
|
||||||
if not include_hidden and f.startswith('.'):
|
if not include_hidden and f.startswith('.'):
|
||||||
continue
|
continue
|
||||||
if filter_ext and not f.endswith(filter_ext):
|
if filter_ext and not f.endswith(filter_ext):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue