Tepiloxtl @ Nekoweb~: Scrobbled API
We're in BETA
We are live, but still in early beta. API methods are not yet finalized and subject to frequent changes, hence I do not post the list or schema here. If you want to use them, ask me on Discord, I am on official Nekoweb Discord
Sites using this project
If you used this project on your site, let me know!
Updates
We are now live with the following changes! Remember to update your site :)- BREAKING CHANGE: nowplaying element for each track, that can be "true" or "false" depending if its a track that user is currently playing. This change also removes the old unreliable @attr element, so you will have to update your code if you still use this
- isnsfw element for each album element in track, that can be "true" or "false" depending on if album art is detected to contain not safe for work content. Detection is powered by MusicBrainz database, powered either by album MBID (when available), or artist/album name. It has decent detection rate, but issues may arise if album is not correctly tagged in MB or if your music is incorrectly tagged (and if you listen to music on Spotify, its really poorly tagged sometimes)
ToDos
fix caching to outgoing requests, not incomingidea: poll for only not extended and if theres a change, poll extendedchange behavior to saving check and data to local variable and submiting it to global after finishing function, may help mitigate issue where collecting round gets terminated due to asyncio bullshitits probably due to the same dict changing size error when user connects/disconnects and connection list changes, that we try/excepts around. Think about it, maybe localise connections and userrequests insteadIn fact, I've just did that. Leaving it be for stability testing, so far good
- external album art search
- hima has something in the works
NSFW album art tag? Seems like MusicBrainz carry that information... sometimesTheres also option of AI detection but uh... AI, yupAlso will require rewriting of API responses from Last.FM itself, have to start working on that
- Addmitely, the NSFW lookup isn't perfect yet, so I'm leaving this as an item to think about later
userinfo endpoint (+ loved, obsessions, what else can we get?)track.getinfowhen crash: dont()its awful but should generally work, but do something betteractually fix that because it causes problems, see bullet point, like, 3should be better now, leaving it as is for testing
- move from local to the server
- support for other platforms
- musicbrainz tmbid - rmbid conversion for lastfm fuckery
- lookup for albumart on musicbrainz too
- So I think that what lastfm does is they return track mbid in user.getrecenttracks, but wants recording mbid in track.getinfo
add normal rest api too? Ill probably have to split the apis between scrobbled.tepiloxtl.net/ws and scrobbled.tepiloxtl.net/rest or something along these lines moved endpoints to ws, will probably add track.getinfo or user.getinfo as rest- make one websocket return info for many users
- make a website: I guess this is it kind of xD
But like, an actual websitelink it to the main domain- Slowly start adding API calls and responses
- I could do something like this to reduce load on polling for websocket. When new user comes up Im sending one check, if I find out they are currently playing they get put into usual rotation, if I find theyre not playing right now, theyre being put into slow queue that I will slowly call over like a minute or something, and if they get back online during that time they get put back into normal rotation. In reverse, if theyre in normal rotation and stop playing for like a minute, they get put into slow queue
- consider caching of last x user tracks and get info separately for each track, it may be smaller overall????
Tangentially related projects on my mind
Option to scrobble tracks from radio? Either live, or present a list of recent songs with a button to add scrobble at appropriate time. feat. https://openscrobbler.com/