1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-12 21:22:17 +00:00

We do support POST requests

This commit is contained in:
Alban Féron 2024-06-01 17:45:54 +02:00
parent 2f90744676
commit 1271b30d64
No known key found for this signature in database
GPG Key ID: 8CE0313646D16165
2 changed files with 3 additions and 2 deletions

View File

@ -13,4 +13,5 @@ from . import api_routing
@api_routing("/getOpenSubsonicExtensions")
def extensions():
return request.formatter("openSubsonicExtensions", [])
extensions = [{"name": "formPost", "versions": [1]}]
return request.formatter("openSubsonicExtensions", extensions)

View File

@ -32,7 +32,7 @@ class BaseFormatter:
class JSONBaseFormatter(BaseFormatter):
def __remove_empty_lists(self, d):
if not isinstance(d, dict):
raise TypeError("Expecting a dict got " + type(d).__name__)
return d
keys_to_remove = []
for key, value in d.items():