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:
parent
09d3f10383
commit
9fb352cc6f
@ -141,7 +141,9 @@ API URL | Your Maloja URL followed by `/apis/listenbrainz`
|
||||
Username | Any name, doesn't matter (don't leave empty)
|
||||
Auth Token | Any of your API keys
|
||||
|
||||
These are tested with the Pano Scrobbler and the Simple Last.fm Scrobbler for Android. I'm thankful for any feedback whether other scrobblers work!
|
||||
My recommendations are to use [Pano Scrobbler](https://github.com/kawaiiDango/pScrobbler) for Android and [Web Scrobbler](https://github.com/web-scrobbler/web-scrobbler) for the browser. Not that Web Scrobbler requires you to supply the full endpoint (`yoururl.tld/apis/listenbrainz/1/submit-listens`).
|
||||
|
||||
I'm thankful for any feedback whether other scrobblers work!
|
||||
|
||||
It is recommended to define a different API key for every scrobbler you use in `clients/authenticated_machines.tsv` in your Maloja folder.
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user