mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Listenbrainz API now nods and smiles on 'playing_now' requests
This commit is contained in:
@@ -5,7 +5,7 @@ author = {
|
||||
"email":"maloja@krateng.dev",
|
||||
"github": "krateng"
|
||||
}
|
||||
version = 2,9,5
|
||||
version = 2,9,6
|
||||
versionstr = ".".join(str(n) for n in version)
|
||||
links = {
|
||||
"pypi":"malojaserver",
|
||||
|
||||
@@ -49,11 +49,16 @@ class Listenbrainz(APIHandler):
|
||||
timestamp = int(listen["listened_at"])
|
||||
except:
|
||||
timestamp = None
|
||||
elif listentype == "playing_now":
|
||||
pass
|
||||
except:
|
||||
raise MalformedJSONException()
|
||||
|
||||
self.scrobble(artiststr,titlestr,timestamp)
|
||||
return 200,{"status":"ok"}
|
||||
|
||||
if listentype == "playing_now": return 200,{"status":"ok"}
|
||||
else:
|
||||
self.scrobble(artiststr,titlestr,timestamp)
|
||||
return 200,{"status":"ok"}
|
||||
|
||||
def validate_token(self,pathnodes,keys):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user