1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Experimental support for Listenbrainz scrobblers

This commit is contained in:
Krateng
2019-05-13 10:45:30 +02:00
parent 042f4f12fb
commit 5aa92a1ab8
5 changed files with 53 additions and 66 deletions

View File

@@ -660,8 +660,11 @@ def post_scrobble():
def sapi(path):
path = path.split("/")
path = list(filter(None,path))
keys = FormsDict.decode(request.params)
headers = request.headers
if "application/json" in request.get_header("Content-Type"):
keys = request.json
else:
keys = FormsDict.decode(request.params)
auth = request.auth
return compliant_api.handle(path,keys,headers,auth)