@@ -324,7 +324,12 @@ class MediaServerClient:
|
||||
Returns:
|
||||
Dictionary of folders with folder_id as key and folder config as value
|
||||
"""
|
||||
return await self._request("GET", API_BROWSER_FOLDERS)
|
||||
response = await self._request("GET", API_BROWSER_FOLDERS)
|
||||
# Server >= c9ee41a wraps the result as {"folders": {...}, "management_enabled": bool}.
|
||||
# Older servers returned the flat folder dict directly.
|
||||
if isinstance(response, dict) and "folders" in response and isinstance(response["folders"], dict):
|
||||
return response["folders"]
|
||||
return response
|
||||
|
||||
async def browse_folder(
|
||||
self, folder_id: str, path: str = "", offset: int = 0, limit: int = 100
|
||||
|
||||
Reference in New Issue
Block a user