From 28a091335cf9271c9de63514822d77a1b06a425b Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Thu, 3 Oct 2019 11:38:56 +0200
Subject: [PATCH] Fix #624: enforce consistentcy in getUser and getMusicFolders
 endpoint in Subsonic

---
 api/funkwhale_api/subsonic/serializers.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/api/funkwhale_api/subsonic/serializers.py b/api/funkwhale_api/subsonic/serializers.py
index 85b969b71..329c644ee 100644
--- a/api/funkwhale_api/subsonic/serializers.py
+++ b/api/funkwhale_api/subsonic/serializers.py
@@ -236,7 +236,11 @@ def get_music_directory_data(artist):
 
 
 def get_folders(user):
-    return []
+    return [
+        # Dummy folder ID to match what is returned in the getMusicFolders endpoint
+        # cf https://dev.funkwhale.audio/funkwhale/funkwhale/issues/624
+        {"id": 1, "name": "Music"}
+    ]
 
 
 def get_user_detail_data(user):
-- 
GitLab