mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-08 23:32:40 +02:00
feat: enhance OneDrive folder management by adding mimeType handling and integrating DriveFolderTree component for improved UI
This commit is contained in:
parent
101e426792
commit
c8767272ec
10 changed files with 257 additions and 606 deletions
|
|
@ -24,6 +24,10 @@ async def list_folder_contents(
|
|||
|
||||
for item in items:
|
||||
item["isFolder"] = is_folder(item)
|
||||
if item["isFolder"]:
|
||||
item.setdefault("mimeType", "application/vnd.ms-folder")
|
||||
else:
|
||||
item.setdefault("mimeType", item.get("file", {}).get("mimeType", "application/octet-stream"))
|
||||
|
||||
items.sort(key=lambda x: (not x["isFolder"], x.get("name", "").lower()))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue