mirror of
https://github.com/krateng/maloja.git
synced 2025-04-19 01:57:37 +03:00
Merge 3838d0f8360ee8c86a4f5b17dd0b57a2eba451f2 into 3ba27ffc371d6087b58314231d9bc291a0d163c2
This commit is contained in:
commit
d9f3b71230
@ -46,6 +46,9 @@ class AudioscrobblerLegacy(APIHandler):
|
||||
key = apikeystore[client]
|
||||
if self.check_token(auth,key,timestamp):
|
||||
sessionkey = self.generate_key(client)
|
||||
if ':' not in host:
|
||||
port = 80 if protocol == 'http' else 443
|
||||
host = f"{host}:{port}"
|
||||
return 200, (
|
||||
"OK\n"
|
||||
f"{sessionkey}\n"
|
||||
@ -109,7 +112,7 @@ class AudioscrobblerLegacy(APIHandler):
|
||||
str(
|
||||
random.choice(
|
||||
list(range(10)) + list("abcdefghijklmnopqrstuvwxyz") +
|
||||
list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"))) for _ in range(64))
|
||||
list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"))) for _ in range(32))
|
||||
|
||||
self.mobile_sessions[key] = client
|
||||
return key
|
||||
|
Loading…
x
Reference in New Issue
Block a user