mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user