fix: mobile menu styling + nextcloud search/mtime/bambu hint
Deploy via Portainer / deploy (push) Successful in 1s
Deploy via Portainer / deploy (push) Successful in 1s
This commit is contained in:
@@ -1970,7 +1970,14 @@ def _parse_propfind(xml_bytes, base_url, username, current_path):
|
||||
items.append({'name': name, 'path': rel, 'is_dir': is_dir,
|
||||
'size': size, 'mtime': mtime, 'ext': ext if not is_dir else 'dir'})
|
||||
|
||||
items.sort(key=lambda x: (0 if x['is_dir'] else 1, x['name'].lower()))
|
||||
def _mtime_ts(m):
|
||||
try:
|
||||
from email.utils import parsedate_to_datetime
|
||||
return parsedate_to_datetime(m).timestamp()
|
||||
except Exception:
|
||||
return 0
|
||||
|
||||
items.sort(key=lambda x: (0 if x['is_dir'] else 1, -_mtime_ts(x['mtime'])))
|
||||
return items
|
||||
|
||||
@app.route('/api/nextcloud/browse')
|
||||
|
||||
Reference in New Issue
Block a user