From 38d4716dc5984ca58cad542de73de90542d6356d Mon Sep 17 00:00:00 2001 From: krateng Date: Fri, 2 Oct 2020 04:35:36 +0200 Subject: [PATCH] Extracting host from request --- maloja/apis/legacy_audioscrobber.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maloja/apis/legacy_audioscrobber.py b/maloja/apis/legacy_audioscrobber.py index 245c6ce..bdcd569 100644 --- a/maloja/apis/legacy_audioscrobber.py +++ b/maloja/apis/legacy_audioscrobber.py @@ -34,6 +34,7 @@ class Audioscrobbler(APIHandler): auth = keys.get("a") timestamp = keys.get("t") apikey = keys.get("api_key") + host = keys.get("Host") # expect username and password if user is not None and apikey is None: receivedToken = lastfmToken(password, timestamp) @@ -107,4 +108,4 @@ def lastfmToken(password, ts): def checkPassword(receivedToken, expectedKey, ts): expectedToken = lastfmToken(expectedKey, ts) - return receivedToken == expectedToken \ No newline at end of file + return receivedToken == expectedToken