protect settings write routes

+ prevent updating guest user
+ add docs to whitelisted auth routes
+ fix: sort in get all route
+ fix: folders not having trailing slash in recentlyplayed
This commit is contained in:
mungai-njoroge
2024-05-01 23:44:38 +03:00
parent cfeff7ff51
commit 5d947f3ad9
6 changed files with 37 additions and 23 deletions
+5 -1
View File
@@ -82,9 +82,13 @@ def get_recently_played(limit=7):
if entry.type == "folder":
folder = entry.type_src
if not folder:
continue
if not folder.endswith("/"):
folder += "/"
is_home_dir = entry.type_src == "$home"
if is_home_dir:
@@ -98,7 +102,7 @@ def get_recently_played(limit=7):
{
"type": "folder",
"item": {
"path": entry.type_src,
"path": folder,
"count": count,
"help_text": "folder",
"time": timestamp_to_time_passed(entry.timestamp),